Using EEPROM with A...
Clear all

Using EEPROM with Arduino - Internal & External

1 Posts
1 Users
DroneBot Workshop
Noble Member Admin
Joined: 3 years ago
Posts: 1145
Topic starter  

Today we will learn how to use EEPROM with an Arduino to add nonvolatile memory to our projects.

Article with code:

Nonvolatile memory refers to memory that retains its data even after being powered down. While there are many ways to accomplish this one of the simplest is by using EEPROM - Electrically Erasable Read-Only Memory.

The Arduino already has some EEPROM built-in, not too much, but for many applications it will be more than enough. You can use it to retain settings in your project. If you need more nonvolatile memory you can add an external EEPROM chip.

Today I will show you how to do both.

The Arduino's internal EEPROM is very easy to work with, thanks to the EEPROM library included within the Arduino IDE. The library comes with several small example sketches, and we’ll see how to use those sketches in our first demo.

We will also work with the AT24LC256, also called just the 24LC256 or 24C256. It’s an EEPROM chip that can store 256 Kilobits (or 32 KB) of data, and it uses the I2C bus for easy interfacing.

We will use the external EEPROM to record servo motor movements and then play them back. This would be perfect for an automated display. Of course, you can build upon the sample code to add EEPROM to almost any project.

Here is what we will cover today:

00:00 - Introduction
02:46 - Understanding EEPROMs
07:16 - Using Internal EEPROM
16:02 - Using External EEPROM

I’ll also cover some of the limitations of using EEPROMs, they are not entirely perfect. The biggest limitation is that they have a limited number of write operations, I’ll show you how you can reduce writes to the internal EEPROM by using the ”update” method.

"Never trust a computer you can’t throw out a window." — Steve Wozniak