Arduino Memory Usage and Persistent Storage on EEPROM

David Such
12 min readSep 19, 2023

There will come a point where you will want to store data which isn’t lost when your microprocessor loses power. This is particularly handy for storing calibration or configuration values, to save you having to re-calibrate some piece of hardware (e.g., IMUs, and servos) every time the power cycles. One solution for Arduino boards is using EEPROM (Electrically Erasable Programmable Read-Only Memory).

Figure 1. Types of Memory

EEPROM is a type of non-volatile ROM that enables individual bytes of data to be erased and reprogrammed. It is used to store small amounts of data which are written occasionally and then read multiple times.

EEPROM is often contained within the microprocessor, and different boards will have different amounts. For example, the ATMega328P used in the UNO R3 and Nano, has 1024 bytes (1KB) of EEPROM. It is organized as a separate data space, and the EEPROM data bytes are addressed linearly between 0 and 1023.

Volatile memory is temporary and loses data when power is lost, 
while non-volatile memory retains data even when the power is off.
Both types of memory serve critical roles in computing systems,
with volatile memory providing the working space for active processes
and non-volatile memory providing long-term data storage and program
storage.

--

--

David Such

Reefwing Software · Embedded Systems Engineer · iOS & AI Development · Robotics · Drones · Arduino · Raspberry Pi · Flight Control