This project demonstrates how to write and read data from two I2C EEPROM memories using the Arduino Uno. The devices used are the Microchip 24LC256, which communicate through the I2C (Inter-Integrated Circuit) protocol.
Originally developed in 2013, this project has been reorganized and documented with improved clarity and structure. It covers several important embedded systems concepts:
- I2C communication protocol
- External non-volatile memory interfacing
- Addressing multiple devices on the same I2C bus
- Pull-up resistor configuration for SDA and SCL lines
- Serial data visualization via Serial Monitor
The 24LC256 is a 256 Kbit (32 KB) I2C serial EEPROM. Multiple devices can share the same I2C bus by configuring different hardware addresses via the A0, A1, A2 pins.
Each EEPROM requires:
- SDA and SCL connected to Arduino I2C pins
- 10 kΩ pull-up resistors on SDA and SCL
- WP (Write Protect) → GND to enable writing, or VCC for read-only mode
- Proper power supply (5 V and GND)
Arduino → I2C Bus
-------------------------------------------
Arduino Pin | I2C Function | Connection
A4 | SDA | I2C Bus
A5 | SCL | I2C Bus
5V | VCC | I2C Bus
GND | GND | I2C Bus
Pull-up Resistors
-------------------------------------------
Line | Resistor Value | Connection
SDA | 10 kΩ | to 5V
SCL | 10 kΩ | to 5V
Write Protect (WP) – EEPROM
-------------------------------------------
Mode | WP Pin
Write Enabled | GND
Read-Only | VCCHow It WorksThe firmware performs the following operations in sequence:
- Initializes the I2C interface
- Writes specific data to each EEPROM device
- Reads back the stored data
- Displays the results in the Serial Monitor
Data is written to devices at I2C addresses 0x51 and 0x52.
The output format can be changed between HEX, OCT, and DEC by modifying the Serial.print() formatting parameter inside the source code.Testing Procedure- Connect the Arduino to the computer via USB
- Open the Serial Monitor in the Arduino IDE
- Observe the written and read values displayed in the console
Full source code available on GitHub.


_ztBMuBhMHo.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)







Comments