English
Language : 

TM4C129ENCPDT Datasheet, PDF (1421/2014 Pages) Texas Instruments – Tiva Microcontroller
Tiva™ TM4C129ENCPDT Microcontroller
21.3.6.2 I2C Slave Command Sequences
Figure 21-15 on page 1421 presents the command sequence available for the I2C slave.
Figure 21-15. Slave Command Sequence
Idle
Write OWN Slave
Address to
I2CSOAR
Write -------1
to I2CSCSR
Read I2CSCSR
NO TREQ bit=1?
YES
Write data to
I2CSDR
NO RREQ bit=1?
FBR is
also valid YES
Read data from
I2CSDR
21.4
21.4.1
Initialization and Configuration
Configure the I2C Module to Transmit a Single Byte as a Master
The following example shows how to configure the I2C module to transmit a single byte as a master.
This assumes the system clock is 20 MHz.
1. Enable the I2C clock using the RCGCI2C register in the System Control module (see page 398).
2. Enable the clock to the appropriate GPIO module via the RCGCGPIO register in the System
Control module (see page 389). To find out which GPIO port to enable, refer to Table
29-5 on page 1932.
3. In the GPIO module, enable the appropriate pins for their alternate function using the
GPIOAFSEL register (see page 778). To determine which GPIOs to configure, see Table
29-4 on page 1921.
June 18, 2014
Texas Instruments-Production Data
1421