cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Reciving Error

yahyaei
Associate
Posted on February 08, 2010 at 17:28

I2C Reciving Error

1 REPLY 1
kr2
Associate
Posted on May 17, 2011 at 15:07

Hello,

If you could change the sequence a litte bit, this problem can be solved.

During Master Rx operation, when you are receiving 2 bytes,  please follow the below sequence. 

 1. Start condition  

 2. Slave address with LSB 0 (master Tx mode)  

 3. Send EEPROM address from where data to be read.  

 4. Send start condition  

 5. Slave address with LSB 1 (master Rx mode)  

 6. Receive 1st Byte 

 7. Disable ACK before reading 1st Byte 

 8. Read and store 1st byte 

 9. Receive 2nd Byte 

 10. Enable STOP, before reading 2nd Byte 

 11. Read and store 2nd byte

In you case, I see that you have swapped step 8 and 7.

This is working in my program.

Regards,

Hari