I'm new to the LPC844 and I am designing an interrupt driven I2C slave (or should I say: 'peripheral'?) device, listening to I2C address 0x78. The problem is that the I2C example code responds with 'NACK' when it's addressed by the master. I hope this forum is a good place to get a bit of support.
I took the LPCXpresso804 board and tried to run the SDK example "lpc_i2c_interrupt_b2b_transfer_slave".
In line 23 of the example code I changed the value of 0x7EU to 0x78U :
#define I2C_MASTER_SLAVE_ADDR_7BIT (0x7EU)
I triple checked the hardware connections: the on-board I2C temperature sensor is disconnected, pull-up resistors are present, voltage levels OK. The pins that I'm connecting to correspond to the pins mentioned in the example.
Other checks: the program really runs, based on the debug output window; the I2C master program is able to send out I2C communication succesfully (including acks etc.).
The trace in the logic analyser is shown in the attachment. It always shows no ACK at the end of the address. This trace is also seen when the I2C lines are disconnected from the LPCXpresso board.
Questions:
- what else should I adjust in the example code to get it to work?
- the master runs at 400 kbps. Should I / can I set the slave to correspond to that speed? Is it relevant at all for a slave device?
Thanks!