1.11 I2C EEPROM Read Write
This example application demonstrates how to use the I2C peripheral to write and read from the I2C serial EEPROM memory.
Description
This example uses the I2C peripheral library to write an array of values to the I2C Serial EEPROM and verify the value written by reading the values back and comparing it to the value written.
Downloading and Building the Application
To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file.
Path of the application within the repository is apps/i2c/host/i2c_eeprom/.
To build the application, refer to the following table and open the project using its IDE.
Project Name | Description |
---|---|
pic32ak_gc_curiosity.X | MPLABX project for Curiosity Platform Development Board and PIC32AK1216GC41064 General Purpose Dual In-Line Module (DIM) |
Setting Up the Hardware
The following table shows the target hardware for the application projects.
Project Name | Description |
---|---|
pic32ak_gc_curiosity.X | Curiosity Platform Development Board and PIC32AK1216GC41064 General Purpose Dual In-Line Module (DIM) |
Setting Up Curiosity Development Board
- To run the application, following additional hardware are required:
- Insert the GP DIM on to DIM slot of Curiosity Board
- Connect the PKoB (J21) on the board to the computer using a USB type-C cable
- Plug the EEPROM 3
Click board into the mikroBUS socket B of the development
boardNote: Ensure that the series resistors on the mikroBUS headers are of value 0 Ohms.
Running the Application
- Build and program the application using its IDE -LED indicates the success or
failure:
- LED is turned ON when the value read from the EEPROM matched with the written value
- LED is turned OFF when the value read from the EEPROM did not match with the written value