Hi There, You are correct that the SDK examples are primarily focused on the internal EEPROM. However, you can easily adapt the I2C examples provided in the SDK to communicate with an external EEPROM like the 24xx512 or 24xxM01.
First, make sure you have the latest SDK for the LPC546xx family.
Once you have the SDK installed, you can find the I2C examples under the following path:
SDK_2.x_LPC546xx\\boards\\lpcxpresso546xx\\driver_examples\\i2c
These examples demonstrate how to use the I2C driver to communicate with I2C devices. You can use them as a starting point for your external EEPROM implementation. You will need to modify the example code to include the specific commands and address format required by your EEPROM device.
For instance, to write data to the 24xx512 EEPROM, you would need to send the following sequence:
1. Start condition 2. Device address with write bit 3. Memory address (high byte) 4. Memory address (low byte) 5. Data to be written 6. Stop condition
Similarly, to read data from the EEPROM, you would need to send the following sequence:
1. Start condition 2. Device address with write bit 3. Memory address (high byte) 4. Memory address (low byte) 5. Repeated start condition 6. Device address with read bit 7. Read data 8. Stop condition
Make sure to consult the datasheet of your specific EEPROM device for the correct commands and address format.
I hope this helps you get started with your I2C EEPROM implementation on the LPC546xx family. If you have any further questions, please feel free to ask.
Kind Regards,