Using EEPROM with Arduino - Internal & External

DroneBot Workshop October 13, 2019
Video Thumbnail
DroneBot Workshop Logo

DroneBot Workshop

@dronebotworkshop

About

Welcome to the Workshop! The DroneBot Workshop is the place where I work with Arduino, Raspberry Pi, ESP32, and lots of other cool microcontrollers, components, and sensors. This is a channel for learning and understanding. While I do build projects, most episodes focus on showing you HOW things work, so you can use the information to bring your own designs to life. Every video has a corresponding article on my website at https://dronebotworkshop.com , along with the diagrams and code samples you’ll need to build your own creations. You can also participate in discussions on my Forum at https://forum.dronebotworkshop.com. Please note that I no longer do any sponsored videos, enquiries for these will be ignored! If you'd like to know more about me or the DroneBot Workshop you can read the FAQ at https://dronebotworkshop.com/about-dronebot-workshop/faq/ And if you have technical questions please ask them on the Forum. Welcome to the Workshop! I hope you enjoy your stay! Bill

Video Description

Today we will learn how to use EEPROM with an Arduino to add nonvolatile memory to our projects. Article with code: https://dronebotworkshop.com/eeprom-arduino/ More projects and tutorials: https://dronebotworkshop.com Chat about this on the Forum: https://forum.dronebotworkshop.com Join the Newsletter: https://dronebotworkshop.com/subscribe/ 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. I hope you enjoy the video!