Inter-Integrated Circuit Controller
7-60
7.8.1.4
I
2
C Operation
Serial Data Formats
Each byte put on the SDA line is 8 bits long. The number of bytes that can be
transmitted or received is unrestricted. The data is transferred with the most
significant bit (MSB) first. Each byte is followed by an acknowledge bit from the
module I
2
C if it is in receiver mode (see Figure 7–26).
Figure 7–26. I
2
C Data Transfer
1
2
7
8
9
1
2
8
9
MSB
Acknowledgement
signal from receiver
Acknowledgement
signal from receiver
SDA
SCL
Start
condition (S)
Start
condition (S)
ACK
ACK
The I
2
C protocol supports two data formats that are shown in Figure 7–27.
-
7-bit/10-bit addressing format
-
7-bit/10-bit addressing format with repeated start condition
The first byte after a start condition (S) always consists of 8 bits. In the acknowl-
edge mode, an extra bit dedicated for acknowledgement bit is inserted after
each byte.
In the addressing formats with 7-bit addresses, the first byte is composed by
seven MSB slave address bits and one LSB R/W bit. While in the addressing
formats with 10-bit addresses, the first byte is composed by seven MSB slave
address, such as 11110XX, where XX is the two MSB of the 10-bit addresses,
and one LSB R/W bit, which is 0 in this case.
The least significant R/W of the address byte indicates the direction of trans-
mission of the following data bytes. If R/W is 0, the master writes (transmit)
data into the selected slave; if it is 1, the master reads (receive) data out of the
slave.