ML51/ML54/ML56
Sep. 01, 2020
Page
558
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
//===========
case 0x38:
/*38H, arbitration lost*/
STA = 1;
//retry to transmit START if bus free
break;
//====================
//Master Receiver Mode
//====================
case 0x40:
/*40H, SLA+R transmitted, ACK received*/
AA = 1; //ACK next received DATA
break;
case 0x48:
/*48H, SLA+R transmitted, NACK received*/
STO = 1;
AA = 1;
break;
case 0x50:
/*50H, DATA received, ACK transmitted*/
DATA_RECEIVED1 = I2DAT;
//store received DATA
if (To_RX_Last_Data1)
//if last DATA will be received
AA = 0;
//not ACK next received DATA
else
//if continuing receiving DATA
AA = 1;
break;
case 0x58:
/*58H, DATA received, NACK transmitted*/
DATA_RECEIVED_LAST1 = I2DAT;
STO = 1;
AA = 1;
break;
//====================================
//Slave Receiver and General Call Mode
//====================================
case 0x60:
/*60H, own SLA+W received, ACK returned*/
AA = 1;
break;
case 0x68:
/*68H, arbitration lost in SLA+W/R
own SLA+W received, ACK returned */
AA = 0;
//not ACK next received DATA after
//arbitration lost
STA = 1;
//retry to transmit START if bus free
break;
case 0x70:
//*70H, General Call received, ACK
returned
AA = 1;
break;
case 0x78:
/*78H, arbitration lost in SLA+W/R
General Call received, ACK returned*/
AA = 0;
STA = 1;
break;
case 0x80:
/*80H, previous own SLA+W, DATA received,
ACK returned*/
DATA_RECEIVED2 = I2DAT;
if (To_RX_Last_Data2)
AA = 0;
else
AA = 1;