EEPROM is a very fundamental feature of Arduino and it has internal EEPROM for this purpose. But sometimes, we need some more to use. In that situation, some dedicated EEPROM ICs like 24Cxxx ICs. In this article, we are going to interface external EEPROM with Arduino. So let’s start!
⚠️ Disclaimer ⚠️
Working with electricity involves serious risk. Ensure you have the necessary skills and take proper safety precautions before attempting any electrical projects. Proceed at your own risk — the author assumes no responsibility for any damage, injury, or issues resulting from the use or misuse of the information provided.
All content on this website is original and protected by copyright. Please do not copy or reproduce content without permission. While most of the resources shared here are open-source and freely accessible for your learning and benefit, your respect for our intellectual effort is appreciated.
If you find our tutorials helpful, consider supporting us by purchasing related materials or sharing our work — it helps keep the content flowing.
Need help or have questions? Leave a comment below — the author is always happy to assist!
Table of Contents
EEPROM ICs:
There are different types of EEPROM ICs in the market from a range of memory capacities. Most of these ICs use the I2C protocol for communication.


Here, SCL & SDA are for I2C communication, A0, A1, A2 are for address. WP is Write Protection, if it is connected to VDD, EEPROM is is write-protected, and if it is connected to GND, no Write Protection.
Circuit diagram:
Here is the circuit diagram with 3 external EEPROMs with Arduino.
This article can be useful too: How to remove noise/garbage from the HD44780 LCD display
U1, U2, U3 are EEPROM ICs. If you need more memory, then you can add ICs up to 8 in total. The base address for EEPROM is 0x50. With this base address, you need to add the EEPROM IC address.
A2 | A1 | A0 | Address (Decimal, HEX) | EEPROM ADDRESS |
0 | 0 | 0 | 0 , 0x00 | 0x50 |
0 | 0 | 1 | 1 , 0x01 | 0x51 |
0 | 1 | 0 | 2 , 0x02 | 0x52 |
0 | 1 | 1 | 3 , 0x03 | 0x53 |
1 | 0 | 0 | 4 , 0x04 | 0x54 |
1 | 0 | 1 | 5 , 0x05 | 0x55 |
1 | 1 | 0 | 6 , 0x06 | 0x56 |
1 | 1 | 1 | 7 , 0x07 | 0x57 |
You can use this hex calculator here.
Arduino Code:
//eeprom #include <Wire.h> #define eeprom1 0x50 //for eeprom1 #define eeprom2 0x51 //for eeprom2 #define eeprom3 0x52 //for eeprom2 //basic address for eeprom is 0x50. //You need to add the eeprom ic address (A0,A1,A2) with this value unsigned int address = 0;//start address void setup() { Serial.begin(9600); Wire.begin(); Serial.println("Writing at eeprom1: 66666"); for (address = 0; address < 5; address++) { writeEEPROM(eeprom1, address, 6); } Serial.println("EEPROM1 read:"); for (address = 0; address < 5; address++) { Serial.print(readEEPROM(eeprom1, address)); } Serial.println(); Serial.println("Writing at eeprom2: 44444"); for (address = 0; address < 5; address++) { writeEEPROM(eeprom2, address, 4); } Serial.println("EEPROM2 read:"); for (address = 0; address < 5; address++) { Serial.print(readEEPROM(eeprom2, address)); } } void loop() { //other codes here } //defines the writeEEPROM function void writeEEPROM(int dev_address, unsigned int eeaddress, byte data ) { Wire.beginTransmission(dev_address); Wire.write((int)(eeaddress >> 8)); //writes the MSB Wire.write((int)(eeaddress & 0xFF)); //writes the LSB Wire.write(data); Wire.endTransmission(); delay(5);//this is important to save data } //defines the readEEPROM function byte readEEPROM(int dev_address, unsigned int eeaddress ) { byte readdata = 0xFF; Wire.beginTransmission(dev_address); Wire.write((int)(eeaddress >> 8)); //writes the MSB Wire.write((int)(eeaddress & 0xFF)); //writes the LSB Wire.endTransmission(); Wire.requestFrom(dev_address, 1); if (Wire.available()) readdata = Wire.read(); delay(5); return readdata; }
Output:

As you see, we saved data to two different EEPROMs, and then we read from those.
Conclusion:
This way, we can add external EEPROM ICs to cover our memory requirements. I hope this will help you a lot in EEPROM interfacing. Thanks for reading, don’t forget to subscribe.
Liked this article? Subscribe to our newsletter:
or,
Visit LabProjectsBD.com for more inspiring projects and tutorials.
Thank you!
0 Comments