I have written a program to read data from Microchip I2C EEPROM 24XX64. Initially I was able to get an acknowledge from the slave for command byte which indicates a READ operation. Perhaps, instead of data bits I was able to witness stL( write drive low signal) in model simulator. I would like to know the reason for this and what must be done to over come this signal.
-
Show us some waveforms and mark where you think things are going wrong!Marty– Marty2012-10-10 16:09:09 +00:00Commented Oct 10, 2012 at 16:09
-
Thanks for the reply. Please find the waveforms in the following link tinypic.com/r/2cr8qrb/6san6086– san60862012-10-10 17:35:41 +00:00Commented Oct 10, 2012 at 17:35
Add a comment
|
1 Answer
To read from an I2C slave, you usually have to write the register address first. The process to read is:
- START
- Device Address + WRITE
- Register Address (# of bytes depends on slave)
- REPEATED START
- Device Address + READ
- Slave ACKs
- Master Read bytes and NACKs when it's had enough
- STOP
Did you do a write to set up a register address for the read?