Hello,
I am using AT89C4051 to interface with AT24C04 I2C memory chip. The SDA and SCL are connected to P1.7 and P1.6 respectively. The firmware is debugged and simulated using Keil. It writes byte to a memory location and reads it back and send it via serial port. The code worked fine in simulation but not in actual hardware. I checked the I2C communication using Digital Storage Oscilloscope and timing diagram show the data is written into the memory and read back properly. But the micro-controller is not able the read the data. In simulation I gave a dummy byte by just toggling the pins and it was read properly which shows the firmware is correct.The pull up resistors are also provided for SDA and SCL. I am not able to corner where the exact problem is.
Thanks Praveen