Hi Mallikarjuna Reddy,
Sorry to send you the wrong project, that is the slave code, you need the master code, not the slave. 0X58 is the master state:
About the state0x58, please do the operation like this which has been described in the user manual:
Data has been received, NOT ACK has been returned. Data will be read from I2DAT. A
STOP condition will be transmitted.
1. Read data byte from I2DAT into Master Receive buffer.
2. Write 0x14 to I2CONSET to set the STO and AA bits.
3. Write 0x08 to I2CONCLR to clear the SI flag.
4. Exit
I have attached the I2C project. 0X50 state is used for data has been received, ACK has been returned. Please refer to the code bundle code to set the AA bit in the 0x50.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------