14.3.6 Serial Data Formats
shows an example of a data transfer on the I2C bus. The I2C module supports 1 to 8-bit data
, 8-bit data is transferred. Each bit put on the SDA line equates to 1 pulse on the SCL line,
and the values are always transferred with the most significant bit (MSB) first. The number of data values that
can be transmitted or received is unrestricted. The serial data format used in
format. The I2C module supports the formats shown in
and described in the
paragraphs that follow the figures.
Note
, n = the number of data bits (from 1 to 8) specified by the bit
count (BC) field of I2CMDR.
SDA
SCL
MSB
Acknowledgement
bit from slave
(No-)Acknowledgement
bit from receiver
1
2
7
8
9
1
2
8
9
Slave address
ACK
START
condition (S)
STOP
condition (P)
R/W
ACK
Data
Figure 14-9. I2C Module Data Transfer (7-Bit Addressing with 8-bit Data Configuration Shown)
14.3.6.1 7-Bit Addressing Format
The 7-bit addressing format is the default format after reset. Disabling expanded address (I2CMDR.XA = 0) and
free data format (I2CMDR.FDF = 0) enables 7-bit addressing format.
), the first byte after a START condition (S) consists of a 7-bit slave address
followed by a R/ W bit. R/ W determines the direction of the data:
• R/ W = 0: The I2C master writes (transmits) data to the addressed slave. This can be achieved by setting
I2CMDR.TRX = 1 (Transmitter mode)
• R/ W = 1: The I2C master reads (receives) data from the slave. This can be achieved by setting
I2CMDR.TRX = 0 (Receiver mode)
S
7 bits of slave address
R/W
ACK
Data
ACK
Data
ACK
P
7
n
n
1
1
1
1
1
1
x x x x x x x
Figure 14-10. I2C Module 7-Bit Addressing Format (FDF = 0, XA = 0 in I2CMDR)
An extra clock cycle dedicated for acknowledgment (ACK) is inserted after each byte. If the ACK bit is inserted
by the slave after the first byte from the master, it is followed by n bits of data from the transmitter (master or
slave, depending on the R/ W bit). n is a number from 1 to 8 determined by the bit count (BC) field of I2CMDR.
After the data bits have been transferred, the receiver inserts an ACK bit.
Inter-Integrated Circuit Module (I2C)
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
845
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......