Texas Instruments CC2650DK ユーザーズマニュアル

ページ / 1570
SDA
SCL
Start
condition
SDA
SCL
Stop
condition
CC26xx/CC13xx
R
PUP
R
PUP
I
2
C Bus
SCL
SDA
Third-party device with I
2
interface
Third-party device with I
2
interface
SDA
SDA
I2CSDA
I2CSCL
SCL
SCL
Functional Description
Figure 21-2. I
2
C Bus Configuration
21.3.1 I
2
C Bus Functional Overview
The I
2
C bus uses only two signals: SDA and SCL, named I2CSDA and I2CSCL on the CC26xx controller.
SDA is the bidirectional serial data line and SCL line is the bidirectional serial clock line. The bus is
considered idle when both lines are high.
Every transaction on the I
2
C bus is 9 bits long, consisting of 8 data bits and 1 acknowledge bit. The
number of bytes per transfer (defined as the time between a valid Start and Stop condition, described in
is unrestricted, an acknowledge bit must follow each byte, and data must be transferred
by the MSB first. When a receiver cannot receive another complete byte, the receiver can hold the clock
line SCL low and force the transmitter into a wait state. The data transfer continues when the receiver
releases the clock SCL.
21.3.1.1 Start and Stop Conditions
The protocol of the I
2
C bus defines two states to begin and end a transaction: Start and Stop. A high-to-
low transition on the SDA line while the SCL is high is defined as a Start condition, and a low-to-high
transition on the SDA line while the SCL line is high is defined as a Stop condition. The bus is considered
busy after a Start condition and free after a Stop condition (see
Figure 21-3. Start and Stop Conditions
The STOP bit determines if the cycle stops at the end of the data cycle or continues on to a Repeated
Start condition. To generate a single transmit cycle, the I
2
C Master Slave Address [I2C_MSA] register is
written with the desired address, the R/S bit is cleared, and the Control register is written with ACK = X (0
or 1), STOP = 1, START = 1, and RUN = 1 to perform the operation and stop. When the operation is
completed (or aborted due an error), the interrupt pin becomes active and the data is readable from the
I
2
C Master Data [I2C_MDR] register. When the I
2
C module operates in master receiver mode, the ACK bit
is normally set, causing the I
2
C bus controller to transmit an acknowledge automatically after each byte.
When the I
2
C bus controller requires no further data transmission from the slave transmitter, the ACK bit
must be cleared.
When operating in slave mode, 2 bits in the I
2
C Slave Raw Interrupt Status [I2C_SRIS] register indicate
detection of Start and Stop conditions on the bus, while 2 bits in the I
2
C Slave Masked Interrupt Status
[I2C_SMIS] register allow promotion of Start and Stop conditions to controller interrupts (when interrupts
are enabled).
1380
SWCU117A – February 2015 – Revised March 2015
Inter-Integrated Circuit (I
2
C) Interface
Copyright © 2015, Texas Instruments Incorporated