MS51
Dec. 17, 2019
Page
282
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
break;
case 0Xb8:
/*B8H, previous own SLA+R, DATA transmitted,
ACK received*/
I2DAT = NEXT_SEND_DATA4;
if (To_TX_Last_Data) //if last DATA will be transmitted
AA = 0;
else
AA = 1;
break;
case 0Xc0:
/*C0H, previous own SLA+R, DATA transmitted,
NACK received, not addressed SLAVE mode
entered*/
AA = 1;
break;
case 0Xc8:
/*C8H, previous own SLA+R, last DATA trans-
mitted, ACK received, not addressed SLAVE
AA = 1;
mode entered*/
break;
}//end of switch (I2STAT)
SI = 0;
//SI should be the last command of I2C ISR
while(STO);
//wait for STOP transmitted or bus error
//free, STO is cleared by hardware
}