Inter-integrated Circuit (I2C) Interface
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
247
Synchronization
– the predefined procedure that synchronizes the clock signals provided by two or more masters.
SDA
– data signal line (Serial Data)
SCL
– clock signal line (Serial Clock)
Transmitter
Master
Receiver
Slave
SCL
SDA
Receiver
Master
Transmitter
Slave
SCL
SDA
Fig 13-2 Master/Slave and Transmitter/Receiver relationships
13.2.2.2
Bus Transfer Terms
The following terms are specific to data transfers that occur to/from the I
2
C bus.
START
(
RESTART
) – data transfer begins with a START or RESTART condition. The level of the SDA data line changes from high to low,
while the SCL clock line remains high. When this occurs, the bus becomes busy.
Note:
START and RESTART conditions are functionally identical.
STOP
– data transfer is terminated by a STOP condition. This occurs when the level on the SDA data line passes from the low state to the
high state, while the SCL clock line remains high. When the data transfer has been terminated, the bus is free or idle once again. The bus
stays busy if a RESTART is generated instead of a STOP condition.
13.2.3
I
2
C Behavior
The I
2
C can be controlled via software to be either:
An I
2
C master only, communicating with other I
2
C slaves; OR
An I
2
C slave only, communicating with one more I
2
C masters.
The master is responsible for generating the clock and controlling the transfer of data. The slave is responsible for either transmitting or
receiving data to/from the master. The acknowledgement of data is sent by the device that is receiving data, which can be either a master or a
slave. As mentioned previously, the I
2
C protocol also allows multiple masters to reside on the I
2
C bus and uses an arbitration procedure to
determine bus ownership.
Each slave has a unique address that is determined by the system designer. When a master wants to communicate with a slave, the master
transmits a START/RESTART condition that is then followed by the slave’s address and a control bit (R/W) to determine if the master wants to
transmit data or receive data from the slave. The slave then sends an acknowledge (ACK) pulse after the address.
If the master (master-transmitter) is writing to the slave (slave-receiver), the receiver gets one byte of data. This transaction continues until the
master terminates the transmission with a STOP condition. If the master is reading from a slave (master-receiver), the slave transmits (slave-
transmitter) a byte of data to the master, and the master then acknowledges the transaction with the ACK pulse. This transaction continues
until the master terminates the transmission by not acknowledging (NACK) the transaction after the last byte is received, and then the master
issues a STOP condition or addresses another slave after issuing a RESTART condition. This behavior is illustrated in Fig 9-9.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03