I am having an issue with the I2C module. I am writing to an LCD controller chip that uses I2C.
If I step through my code, I can see all bytes being pumped out and the LCD controller chip is
ACKing my bytes properly.
The minute I let the software run, bytes don't appear on my scope,nor do I see the numbers I
am pumping out to the LCD?????
I feel there is an issue with my I2C STATUS wait. Here is the code for the STATUS wait:
I2C0_D = ucData; //Write
//Make sure we Arbitration is not lost 1=Lost 0=Standard bus operation
if ((I2C0_S & I2C_S_ARBL_MASK) == 0)
{//Begin if (Standard Bus Operation)
//Wait until an acknowledge signal is detected
while ((I2C0_S & I2C_S_RXAK_MASK) == 1)
{
return (1);
break;
}
}//End if (Standard Bus Operation)
else
I2C0_S |= I2C_S_ARBL_MASK; //Clear the arbitration
Thank you,
Neil