1. I2C_24LC04B
1.1. Function description:
This demo shows the I2Cn write to EEPROM, and then read from EEPROM (24LC04B) at the same address in cpu mode. I2Cn writes a page of data(16 bytes) to the EEPROM, waitting for the standby state of the EEPROM, and then reads back the data from the same address and compares it.
1.2. Test result:
if write to EEPROM data is same to read data form EEPROM, print pass, if not print fail.
1.3. IO connection:
PAD |
PAD |
|---|---|
pad_i2cn_scl |
eeprom_scl |
pad_i2cn_sda |
eeprom_sda |
Note
The ‘n’ in “i2cn” indicate the peripheral number.