ML51/ML54/ML56
Sep. 01, 2020
Page
541
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
S
I2C_DAT
(SLA+W)
ACK
Last Status
STATUS=0x08
Updated Status
STATUS=0x18
Register Control
I2C_DAT=SLA+W
(STA,STO,SI,AA)=(0,0,1,x)
Master to Slave
Slave to Master
Figure 6.12-9 Control I
2
C Bus according to the Current I
2
C Status
Master Transmitter Mode
In the master transmitter mode, several bytes of data are transmitted to a slave receiver. The master
should prepare by setting desired clock rate in I2CnCLK. The master transmitter mode may now be
entered by setting STA (I2CnCON.5) bit as 1. The hardware will test the bus and generate a START
condition as soon as the bus becomes free. After a START condition is successfully produced, the SI
flag (I2CnCON.3) will be set and the status code in I2CnSTAT show 08H. The progress is continued
by loading I2CnDAT with the target slave addre
ss and the data direction bit “write” (SLA+W). The SI
bit should then be cleared to commence SLA+W transaction.
After the SLA+W byte has been transmitted and an acknowledge (ACK) has been returned by the
addressed slave device, the SI flag is set again and I2CnSTAT is read as 18H. The appropriate action
to be taken follows user defined communication protocol by sending data continuously. After all data is
transmitted, the master can send a STOP condition by setting STO (I2CnCON.4) and then clearing SI
to terminate the transmission. A repeated START condition can also be generated without sending
STOP condition to immediately initial another transmission.