The pins are up to 3.3 V tolerant, and the pull-up resistors should be selected as a trade-off between
communication speed (lower resistors lead to faster edges) and data integrity (the input logic levels must be
guaranteed to preserve communication reliability). When the bus is idle, both SDA and SCL lines are pulled
HIGH.
5.13.1 Data validity
The data on the SDA line shall remain stable during the high state of every SCL clock pulse. The high and low
states of the SDA line shall only change when the SCL clock signal is low.
5.13.2 Start and stop conditions
Both the SDA and the SCL lines remain high when the I
2
C bus is not busy. A START condition is indicated by a
high-to-low transition of the SDA line when SCL is HIGH, while the STOP condition is indicated by a low-to-high
transition of the SDA line when SCL is HIGH. A STOP condition must be sent before each START condition.
5.13.3 Byte format
Every byte transferred over the SDA line contains 8 bits. Each byte received by STWLC38 is generally followed
by an acknowledge (ACK) bit. The most significant bit (MSB) is transferred first. A single data bit is transferred
during each clock pulse.
The device generates an ACK pulse (by pulling the SDA line low during the acknowledge clock pulse) to confirm a
correct device address or data bytes reception.
5.13.4 Interface protocol
The interface protocol consists of:
• A start condition (START)
• A device address + R/W bit (read =1 / write =0)
• A register H address byte
• A Register L address byte
• A sequence of n data bytes (each data byte must be acknowledged by the receiver)
• A stop condition (STOP)
The register address byte determines the first register in which the read or write operation takes place. When a
read or write operation is finished, the register address is automatically incremented.
5.13.5 Writing to a single register
Writing to a single register begins with a START condition followed by the device address 0xC2 (7-bit device
address plus R/W bit cleared), two bytes of the register pointer and the data byte to be written in the destination
register. Each transmitted byte is acknowledged by the STWLC38 through an ACK pulse.
Figure 43. Writing to a single I²C register
UM3154
I²C Interface
UM3154 - Rev 2
page 36/81