AW86225
October 2021 V1.9
www.awinic.com
22 Copyright © 2020 SHANGHAI AWINIC TECHNOLOGY CO., LTD
STOP or
Repeated
START
(P or Sr)
START or
repeated
START
(S or Sr)
SDA
SCL
1
2
8
9
9
8
2
1
MSB
ACK
MSB
ACK
R/W
Figure 24 Data transmission on the I
2
C bus
Write Process
Writing process refers to the master device write data into the slave device. In this process, the transfer
direction of the data is always unchanged from the master device to the slave device. All acknowledge bits are
transferred by the slave device, in particular, the device as the slave device, the transmission process in
accordance with the following steps, as shown in Figure 25:
Master device generates START state. The START state is produced by pulling the data line SDA to a low
level when the clock SCL signal is a high level.
Master device transmits the 7-bits device address of the slave device, followed by the "read / write" flag (flag
W
R/
= 0);
The slave device asserts an acknowledgment bit (ACK) to confirm whether the device address is correct;
The master device transmits the 8-bit register address to which the first data byte will written
;
The slave device asserts an acknowledgment (ACK) bit to confirm the register address is correct;
Master sends 8 bits of data to register which needs to be written;
The slave device asserts an acknowledgment bit (ACK) to confirm whether the data is sent successfully;
If the master device needs to continue transmitting data by sending another pair of data bytes, just need to
repeat the sequence from step 6. In the latter case, the targeted register address will have been auto-
incremented by the device.
The master device generates the STOP state to end the data transmission.
START
slave device address
R/W
A
Register address
A
write data
STOP
A
write data
A
‘
0
’
(
write
)
(1)
(2)
(3)
(4)
(5)
(6)
(9)
(7)
(6r)
(7r)
Data Transmission: 8 + 1 bit data acknowledge bit (ACK)
Register address auto increment - (8)
From the master to the slave device
From slave to master device
data
transmission
direction
Figure 25 Writing process (data transmission direction remains the same)
Read Process
Reading process refers to the slave device reading data back to the master device. In this process, the direction
of data transmission will change. Before and after the change, the master device sends START state and slave
address twice, and sends the opposite "read/write" flag. In particular, AW86225 as the slave device, the
transmission process carried out by following steps listed in Figure 26:
Master device asserts a start condition;
Master device transmits the 7 bits address of the device, and followed by a "read / write" flag (
W
R/
= 0);
The slave device asserts an acknowledgment bit (ACK) to confirm whether the device address is correct;
The master device transmits the register address to make sure where the first data byte will read;
The slave device asserts an acknowledgment (ACK) bit to confirm whether the register address is correct or
not;
awinic Confidential