Content originally posted in LPCWare by xianghuiwang on Thu Apr 10 11:05:07 MST 2014
Hi, Adrian,
I would suggest you check the ICCON setting for P0_4 and P0_5, I suspect they are wrong so the I2C functionality are not activated:
try:
LPC_IOCON->PIO0_4 &= ~0x3F;/* I2C I/O config */
LPC_IOCON->PIO0_4 |= 0x01;/* I2C SCL */
LPC_IOCON->PIO0_5 &= ~0x3F;
LPC_IOCON->PIO0_5 |= 0x01;/* I2C SDA */
Good luck!