MSP432
V
CC
Serial Data (SDA)
Serial Clock (SCL)
Device A
Device B
Device C
eUSCI_B Operation – I
2
C Mode
960
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Enhanced Universal Serial Communication Interface (eUSCI) – I
2
C Mode
Figure 26-2. I
2
C Bus Connection Diagram
NOTE:
SDA and SCL levels
The SDA and SCL pins must not be pulled up above the device V
CC
level.
26.3.1 eUSCI_B Initialization and Reset
The eUSCI_B is reset by a Hard Reset or by setting the UCSWRST bit. After a Hard Reset, the
UCSWRST bit is automatically set, keeping the eUSCI_B in a reset condition. To select I
2
C operation, the
UCMODEx bits must be set to 11. After module initialization, it is ready for transmit or receive operation.
Clearing UCSWRST releases the eUSCI_B for operation.
Configuring and reconfiguring the eUSCI_B module should be done when UCSWRST is set to avoid
unpredictable behavior. Setting UCSWRST in I
2
C mode has the following effects:
•
I
2
C communication stops.
•
SDA and SCL are high impedance.
•
UCBxSTAT, bits 15-9 and 6-4 are cleared.
•
Registers UCBxIE and UCBxIFG are cleared.
•
All other bits and registers remain unchanged.
NOTE:
Initializing or reconfiguring the eUSCI_B module
The recommended eUSCI_B initialization and reconfiguration process is:
1.
Set UCSWRST.
2.
Initialize all eUSCI_B registers with UCSWRST = 1 (including UCxCTL1).
3.
Configure ports.
4.
Clear UCSWRST in software.
5.
Enable interrupts (optional).
26.3.2 I
2
C Serial Data
One clock pulse is generated by the master device for each data bit transferred. The I
2
C mode operates
with byte data. Data is transferred MSB first (see
The first byte after a START condition consists of a 7-bit slave address and the R/W bit. When R/W = 0,
the master transmits data to a slave. When R/W = 1, the master receives data from a slave. The ACK bit
is sent from the receiver after each byte on the ninth SCL clock.