Change
of data
allowed
Data line
stable
SDA
SCL
R/S
LSB
Slave address
MSB
Data
Slave address
ACK
LSB
MSB
ACK
R/S
SCL
1
2
7
9
1
2
7
8
9
Stop
Start
SDA
MSB
LSB
8
Functional Description
1317
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Inter-Integrated Circuit (I
2
C) Interface
19.3.1.2 Data Format With 7-Bit Address
Data transfers follow the format in
. After the START condition, a slave address is transmitted.
This address is 7 bits long followed by an eighth bit, which is a data direction bit (R/S bit in the I2CMSA
register). If the R/S bit is clear, it indicates a transmit operation (send), and if it is set, it indicates a request
for data (receive). A data transfer is always terminated by a STOP condition generated by the master,
however, a master can initiate communications with another device on the bus by generating a repeated
START condition and addressing another slave without first generating a STOP condition. Various
combinations of receive and transmit formats are then possible within a single transfer.
Figure 19-4. Complete Data Transfer With a 7-Bit Address
The first seven bits of the first byte make up the slave address (see
). The eighth bit
determines the direction of the message. A zero in the R/S position of the first byte means that the master
transmits (sends) data to the selected slave, and a one in this position means that the master receives
data from the slave.
Figure 19-5. R/S Bit in First Byte
19.3.1.3 Data Validity
The data on the SDA line must be stable during the high period of the clock, and the data line can change
only when SCL is low (see
Figure 19-6. Data Validity During Bit Transfer on the I
2
C Bus
19.3.1.4 Acknowledge
All bus transactions have a required acknowledge clock cycle that is generated by the master. During the
acknowledge cycle, the transmitter (which can be the master or slave) releases the SDA line. To
acknowledge the transaction, the receiver must pull down SDA during the acknowledge clock cycle. The
data transmitted out by the receiver during the acknowledge cycle must comply with the data validity
requirements described in
.
When a slave receiver does not acknowledge the slave address, SDA must be left high by the slave so
that the master can generate a STOP condition and abort the current transfer. If the master device is
acting as a receiver during a transfer, it is responsible for acknowledging each transfer made by the slave.
Because the master controls the number of bytes in the transfer, it signals the end of data to the slave
transmitter by not generating an acknowledge on the last data byte. The slave transmitter must then
release SDA to allow the master to generate the STOP or a repeated START condition.