AnsweredAssumed Answered

MKE02Z I2C0 issue

Question asked by Neil Porven on Sep 2, 2016
Latest reply on Sep 4, 2016 by Neil Porven

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);
  }//End if (Standard Bus Operation)
  I2C0_S |= I2C_S_ARBL_MASK; //Clear the arbitration


Thank you,