Hi Audrey Jam,
Unfortunately, until now, about the sample code, we just have the i2c_8Nxx.c, we still don't have the dedicated i2c sample code.
About the document, please refer tot he LPC8N04 user manual I2C chapter:
https://www.nxp.com/docs/en/user-guide/UM11074.pdf
Actually, in the the i2c_8Nxx.c, there has some slave read and send data, it is in handleSlaveXferState function.
About the slave address, actually, it is configured in the slave code, then when the master send the according slave addres, the I2C slave will match, and will get the according status in teh I2C status register. You don't need to read the slave address from master in the slave code. The slave address can be set with function setSlaveAddr.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------