Hi, I'm trying to interface a Toshiba 16bit MCU with another IC(call this IC2), with the MCU being a slave transmitter. The IC2 expects a slave EEPROM at a certain address, and I've setup the MCU to be at this address. The problem is that the MCU isn't interrupting or acknowledging the signals all the time. I've looked at the SDA/SCL waveforms and while IC2 is sending the first device address(with wr direction), the MCU doesn't ACK the address, even though it does interrupt at the end of the address. IC2 hence immediately sends the device address again, and only this time does the MCU ACK it. This is followed by a dummy word address(0x00) then another device address(with rd direction), and the actual 16 byte data.
At the end of each of the addresses, the MCU is interrupting, as well as the end of the 1st data byte, but after that the MCU stops going into the ISR, so IC2 is getting all 0xff which is wrong. In fact, even the 1st data byte is wrong even though I write the data into the serial buffer in the ISR.
Does anyone know what could be wrong? This is the first time I'm working with I2C and isn't as straightfoward as I thought.