MS51
Dec. 17, 2019
Page
267
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
A = acknowledge (SDA low)
A = not acknowledge (SDA high)
S = START condition
P = STOP condition
‘0’ : write
S
SLAVE ADDRESS
R/W
A
DATA
A
DATA
A/A
P
from master to slave
from slave to master
data transfer
(n bytes + acknowlegde)
Figure 6.10-4 Master Transmits Data to Slave by 7-bit
Figure 6.10-5 shows a master read data from slave by 7-bit. A master addresses a slave with a 7-bit
address and 1-bit read index to denote that the master wants to read data from the slave. The slave
will start transmitting data after the slave returns acknowledge to the master.
‘1’ : read
S
SLAVE ADDRESS
R/W
A
DATA
A
DATA
A/A
P
data transfer
(n bytes + acknowlegde)
Figure 6.10-5 Master Reads Data from Slave
by 7-bit
There is an exception called “General Call” address, which can address all devices by giving the first
byte of data all 0. A General Call is used when a master wishes to transmit the same message to
several slaves in the system. When this address is used, other devices may respond with an
acknowledge or ignore it according to individual software configuration. If a device response the
General Call, it operates as like in the slave-receiver mode. Note that the address 0x00 is reserved for
General Call and cannot be used as a slave address, therefore, in theory, a 7-bit addressing I
2
C bus
accepts 127 devices with their slave addresses 1 to 127.
SDA
SCL
1-7
8
9
8
9
1-7
1-7
8
9
ADDRESS
W/R
ACK
S
P
DATA
ACK
DATA
ACK
Figure 6.10-6 Data Format of One I
2
C Transfer
During the data transaction period, the data on the I2C0_SDA line should be stable during the high
period of the clock, and the data line can only change when I2C0_SCL is low.
Acknowledge
6.10.1.3
Th
e
9
th
I2C0_SCL pulse for any transferred byte is dedicated as an Acknowledge (ACK). It allows
receiving devices (which can be the master or slave) to respond back to the transmitter (which also
can be the master or slave) by pulling the I2C0_SDA line low. The acknowledge-related clock pulse is
generated by the master. The transmitter should release control of I2C0_SDA line during the
acknowledge clock pulse. The ACK is an active-low signal, pulling the I2C0_SDA line low during the
clock pulse high duty, indicates to the transmitter that the device has received the transmitted data.
Commonly, a receiver, which has been addressed is requested to generate an ACK after each byte
has been received. When a slave receiver does not acknowledge (NACK) the slave address, the
I2C0_SDA line should be left high by the slave so that the mater can generate a STOP or a repeated