~ ~
~ ~
~ ~
~ ~
~ ~
~ ~
SDA
SCL
START
condition (S)
STOP
condition (P)
MSB
1
2
6
7
8
9
1 2
3
7
8
9
R/W ACK
ACK
Acknowledge signal
from receiver
Acknowledge signal
from receiver
~ ~
~ ~
3
~ ~
~ ~
~ ~
SDA
SCL
START
condition (S)
STOP
condition (P)
I2C Module Operation
1771
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Inter-Integrated Circuit (I2C) Module
31.2.4 I2C Module Start and Stop Conditions
START and STOP conditions are generated by a master I2C module.
•
The START condition is defined as a high-to-low transition on the SDA line while SCL is high. A
master drives this condition to indicate the start of data transfer. The bus is considered to be busy after
the START condition, and the bus busy bit (BB) in I2CSR is set to 1.
•
The STOP condition is defined as a low-to-high transition on the SDA line while SCL is high. A master
drives this condition to indicate the end of data transfer. The bus is considered to be free after the
STOP condition, therefore the BB bit in I2CSR is cleared to 0.
Figure 31-5. I2C Module START and STOP Conditions
For the I2C module to start a data transfer with a START condition, the master mode bit (MST) and the
START condition bit (STT) in the I2CMDR must both be set to 1. For the I2C module to end a data
transfer with a STOP condition, the STOP condition bit (STP) must be set to 1. When the BB bit is set to 1
and the STT bit is set to 1, a repeated START condition is generated.
31.2.5 Serial Data Formats
The I2C module operates in byte data format. Each message put on the SDA line is 2 to 8-bits long. The
number of messages that can be transmitted or received is unrestricted. The data is transferred with the
most significant bit (MSB) first (
). Each message is followed by an acknowledge bit from the
I2C if it is in receiver mode. The I2C module does not support little endian systems.
Figure 31-6. I2C Module Data Transfer
The first byte after a START condition (S) always consists of 8 bits that comprise either a 7-bit address
plus the R/W bit, or 8 data bits. The eighth bit, R/W, in the first byte determines the direction of the data.
When the R/W bit is 0, the master writes (transmits) data to a selected slave device; when the R/W bit is
1, the master reads (receives) data from the slave device. In acknowledge mode, an extra bit dedicated
for the acknowledgement (ACK) bit is inserted after each message.
The I2C module supports the following formats:
•
7-bit addressing format (
•
10-bit addressing format (
)
•
7-bit/10-bit addressing format with repeated START condition (
•
Free-data format (
)