Content originally posted in LPCWare by daniel.widyanto on Mon Oct 15 00:11:17 MST 2012
Check with your oscilloscope if your I2C slave is working.
The sequence should be
[LIST=1]
[1]0x08 -> START bit sent
[2]0x18 -> I2C slave address sent and slave responds with ACK (or)
[2a]0x20 -> I2C slave address sent and slave responds with NACK (or)
[2b]0x38 -> Only happen in multi-master I2C bus (or)
[2c]0x68 -> Only happen in multi-master I2C bus
[/LIST]
I suppose you are addressing incorrect I2C slave, and hence receiving 0x20 (instead of 0x18) as I2C mode, because the I2C slave didn't respond (NACK received) to the slave address.