This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC932 I2C problem

I connected EPM900 board and a Philip LPC900 MCU to test I2C communication.
Address of Slave was set as 0xa0.
The initial condition of master was I2CON=0x40(I2EN=1, others =0)
slave was 0x44(I2EN, AA=1, others =0).
When master transmitted data to slave, following conditions occured...
Master set I2CON=0x60 (I2EN=1, STA=1, others=0) to generate START condition.
Master interrupted, I2STAT=0x08
loaded slave address I2DAT=0xa0,
I2CON=0x40 (I2EN=0, others=0)
return from ISR...
Then,
Slave interrupted,
but I2STAT was not 0x60.(Own SLA+W has been receive; ACK has been returned)
It became 0xc8 instead.(Slave transmitter mode, last data byte in I2DAT has been
transmitted, ACK has been received)
While the I2DAT registor got data 0xa0 from IIC bus indeed.
Why this abnormal condition occured ?
Also,Master interrupted again, I2STAT=0x20(SLA+W has been transmitted; NAK has been
received)
No matter EPM900 or LPC900 served as master/slave, the condition was the same.