Revision 1.1, 23.02.2009
Contents
1. MC -> Host
1.1. START condition
A START condition is represented as the character "S" being transmitted. Example:
S
1.2. Address transmission
- The recipient's address is transmitted after the start condition indicator as described in section 1.1, followed by the DATA designator as described in section 1.3, followed by one byte containing the (seven bit) address. Example:
SDd # addressed device was 0x64
Note: 10-bit addressing must be detected and interpreted by host computer software.
1.3. READ/WRITE bits
- Read and write bits are encoded as the least significant bit in the address transmission as described in section 1.2. The LSB being set (1) represents a READ request, the LSB being not set (0) represents a WRITE request.
1.3. Data transmission
Data is transmitted bytewise, prefixed with the character "D". A null byte is transmitted as {_}. Example:
DB # data was 0x42
1.4. ACK/NACK
A positive acknlowledgment (ACK) bit is transmitted as the character "A", the negative acknowledgment (NACK) is transmitted as the character "N". Example:
A # Acknowledgment of last transmission
1.5. STOP condition
- A STOP condition is represented by the character ".", followed by cursor return and newline characters. Example:
.\r\n
2. Host -> MC
(not defined)
3. Examples
3.1.
- A full transmission on I2C bus, directed to a device with address 0x4e, reading two bytes of data (0x31, 0x32) successfully, could look like this:
SDNAD1AD2N.
THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.
For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.