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

I2C NACK Problem

Using the Keil LPC 2129 EVB, I set up the I2C port in Slave Mode and talk to a master device on the bus. I notice that every 500 or so transfers, when the Keil EVB recieves:
[SLA][W] it Nacks the byte instead of Acking it. I don't understand how it could be Nacking, since when it recieves its Slave Address and Write bit, it goes into a case where I only ACK. An excerpt of my code is as follows:

void i2c_isr(void) __irq
{
    unsigned char status;
    status = I2STAT & 0xF8;
switch(status)
		{
// SLA+W has been recieved and ACK has been returned
//Arbitration Lost in SLA+R/W as
//Arbitration Lost in SLA+R/W
case 0x60:
case 0x68:
case 0x70:
case 0x78:											   			I2CONCLR = 0x20;	//STA=0
	I2CONSET = 0x44;		//Set ACK to enable Slave Rx Mode
	I2CONCLR = 0x08; 	// SI = 0
	break;
...

Any suggestions, how it could be Nacking after a Write bit?