I am looking pseudo code to check ACK or NAK and generate ACK or NAK in i2c communication

as given in diagram The master issues Start, then sends the slave address and slave sends a single ACK or NAKa after receiving 8 bits

as given in diagram The master issues Start, then sends the slave address and slave sends a single ACK or NAKa after receiving 8 bits
Code:
void main (void)
{
//How to write a pseudo code to check ACK or NAK and to generate ACK or NAK
}
Attachments
-
29.9 KB Views: 5
Last edited: