MS51
Dec. 17, 2019
Page
271
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
I2CnDAT
(SLA+R)
ACK
NAK
I2CnDAT
(Data)
NAK
I2CnDAT
(Data)
ACK
P
S
P
Sr
I2CnDAT=SLA+R
(STA,STO,SI,AA)=(0,0,1,x)
STATUS=0x40
STATUS=0x48
STATUS=0x08
STATUS=0xF8
STATUS=0x10
STATUS=0x50
STATUS=0x58
(STA,STO,SI,AA)=(0,0,1,1)
(STA,STO,SI,AA)=(0,0,1,0)
(STA,STO,SI,AA)=(1,1,1,x)
(STA,STO,SI,AA)=(0,1,1,x)
(STA,STO,SI,AA)=(1,0,1,x)
S
STATUS=0x08
(STA,STO,SI,AA)=(1,0,1,x)
Master to Slave
Slave to Master
Arbitration Lost
I2CnDAT
(Data)
ACK
(STA,STO,SI,AA)=(0,0,1,0)
(Arbitration Lost) ACK
STATUS=0x38
I2CnDAT
(SLA+R)
ACK/
NAK
I2CnDAT=SLA+R
(STA,STO,SI,AA)=(0,0,1,X)
(Arbitration Lost)
STATUS=0x38
(STA,STO,SI,AA)=(0,0,1,X)
...
I
2
C bus will be release;
Not addressed SLV mode will be enterd
...
(STA,STO,SI,AA)=(1,0,1,X)
A START will be transmitted
when the bus becomes free
Enter not addressed SLV
mode
Send a START when bus becomes
free
MR
MT
MR
Master Receiver
MR
I2CnDAT
(SLA+R)
ACK
I2CnDAT=SLA+R
(STA,STO,SI,AA)=(0,0,1,1)
(Arbitration Lost) ACK
STATUS= 0x68, 0x78, 0xB0
To corresponding states in
slave mode
Figure 6.10-11 Flow and Status of Master Receiver Mode
Slave Receiver
6.10.2.3
In the slave receiver mode, several bytes of data are received form a master transmitter. Before a
transmission is commenced, I2CnADDRx should be loaded with the address to which the device will
respond when addressed by a master. I2CnCLK does not affect in slave mode. The AA bit should be
set to enable acknowledging its own slave address. After the initialization above, the I
2
C idles until it is
addressed by its own address with the data direction
bit “write” (SLA+W). The slave receiver mode
may also be entered if arbitration is lost.
After the slave is addressed by SLA+W, it should clear its SI flag to receive the data from the master
transmitter. If the AA bit is 0 during a transaction, the slave will return a non-acknowledge after the
next received data byte. The slave will also become not addressed and isolate with the master. It
cannot receive any byte of data with I2CnDAT remaining the previous byte of data, which is just
received.
Slave Transmitter
6.10.2.4
The I
2
C port is equipped with four slave address registers, I2CnADDRx (x=0~3). The contents of the
register are irrelevant when I
2
C is in Master mode. In the slave transmitter mode, several bytes of data
are transmitted to a master receiver. After I2CnADDRx and I2CnCON values are given, the I
2
C wait