AnsweredAssumed Answered

Operating LPC824 as I2C Slave

Question asked by Graham Sewell on Nov 10, 2016
Latest reply on Dec 22, 2016 by Kerry Zhou

I am operating the LPC824 as an I2C slave and have used the example code along with various other source from the support pages.  My problem relates to the first ACK to the slave address.  I have created a master using an LPC4088 board (which was available) and I have tested this with a known I2C peripheral.  It sends a slave address and two command bytes.  Connecting this to my LPC824 fails after transmission of the Slave address as the 824 is not pulling SDA low.  However, it seems to go to a half Vcc level which is seen by the 4088 as NAK.  I initially tried using interrupt mode but am now using the code at the end of the UM10800 data sheet.  This is in a tight loop so SLVCONTINUE is being set as soon as the slave address is received.  I can see that the address is correct and that a match is found to the 824 configuration.  Sometimes I am also seeing a half Vcc level on the 9th (ACK) clock from the master (SCL).  I am using the internal system clock; is the I2C divider crucial when running only in slave mode?  Any ideas anybody, please?