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: Electricity is always dangerous. Proper skill is required to work with electricity. Do work at your own risk. The author will not be responsible for any misuse or harmful act or any mistake you make. The contents of this website are unique and copyright protected. Kindly don’t do any nonsensical act copying and claiming it as yours. Most of the articles published here are kept as open-source to help you. Take the knowledge for free and use it, but if you are interested you can buy the ready resources offered here. If you need any help or guide feel free to comment below, the author will try to help you. Thanks.


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.

external EEPROM with Arduino Uno

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.

A2A1A0Address (Decimal, HEX) EEPROM ADDRESS
0000 , 0x000x50
0011 , 0x010x51
0102 , 0x020x52
0113 , 0x030x53
1004 , 0x04 0x54
1015 , 0x050x55
1106 , 0x060x56
1117 , 0x070x57
EEPROMs and its address

You can use this hex calculator here.

Arduino Code:

#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.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("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.write((int)(eeaddress >> 8)); //writes the MSB
  Wire.write((int)(eeaddress & 0xFF)); //writes the LSB
  delay(5);//this is important to save data

//defines the readEEPROM function
byte readEEPROM(int dev_address, unsigned int eeaddress )
  byte readdata = 0xFF;
  Wire.write((int)(eeaddress >> 8)); //writes the MSB
  Wire.write((int)(eeaddress & 0xFF)); //writes the LSB
  Wire.requestFrom(dev_address, 1);
  if (Wire.available())
    readdata =;
  return readdata;


As you see, we saved data to two different EEPROMs, and then we read from those.


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.


Also let me know what do you want to get as the next article, comment below!


Mithun K. Das; B. Sc. in EEE from KUET; Head of R&D @ M's Lab Engineering Solution. "This is my personal blog. I post articles on different subjects related to electronics in the easiest way so that everything becomes easy for all, especially for beginners. If you have any questions, feel free to ask through the contact us page." Thanks.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *