Component guide · Intermediate · 3 min read
EEPROM and Flash Memory Chips (AT24C256, W25Q)
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
EEPROM and flash chips store data that stays when power is off. I2C EEPROMs such as the AT24C256 hold a few kilobytes, can be written byte by byte, and last about a million writes per cell. SPI flash such as the W25Q64 holds megabytes but must be erased in blocks before rewriting. FRAM is fast and nearly unlimited but costs more. For files and logs, an SD card is usually simpler.
Key specs at a glance
- AT24C02 to AT24C512
- 256 bytes to 64 KB, I2C, about 1 million write cycles
- W25Q32 / 64 / 128
- 4, 8 or 16 MB SPI flash, about 100,000 erase cycles per sector
- FRAM (MB85RC)
- Kilobytes, I2C or SPI, around 10^12 writes, no write delay
- Write time
- About 5 ms per EEPROM page; flash sector erase takes tens of ms
- Supply
- Many work from 1.8 to 5.5 V (check); W25Q is 3.3 V only
- Page size
- AT24C256: 64-byte pages; writes must not cross a page boundary
Which memory to use
| Type | Size | Writes | Good for |
|---|---|---|---|
| Internal EEPROM (Uno) | 1 KB | ~100,000 | A few settings |
| I2C EEPROM | 256 B to 64 KB | ~1,000,000 | Settings, counters, calibration |
| SPI flash | 1 to 16 MB+ | ~100,000 per sector | Fonts, images, audio, big logs |
| FRAM | 4 to 512 KB | ~10^12 | Fast, frequent logging |
| SD card | GBs | Managed by card | Files you read on a PC |
- Internal EEPROM (Uno)
- Size:
- 1 KB
- Writes:
- ~100,000
- Good for:
- A few settings
- I2C EEPROM
- Size:
- 256 B to 64 KB
- Writes:
- ~1,000,000
- Good for:
- Settings, counters, calibration
- SPI flash
- Size:
- 1 to 16 MB+
- Writes:
- ~100,000 per sector
- Good for:
- Fonts, images, audio, big logs
- FRAM
- Size:
- 4 to 512 KB
- Writes:
- ~10^12
- Good for:
- Fast, frequent logging
- SD card
- Size:
- GBs
- Writes:
- Managed by card
- Good for:
- Files you read on a PC
Using an I2C EEPROM
Wire VCC, GND, SDA and SCL; the A0 to A2 pins set the address, 0x50 when all are low. Many modules include I2C pull-ups and a write-protect jumper that must be off to write.
Each write sends a two-byte memory address followed by data. Up to one page (64 bytes on the AT24C256) can be written in one go; the chip then needs about 5 ms before it accepts the next write. If a write crosses a page boundary, it wraps to the start of the same page and overwrites data, which is the classic bug.
Wear and safe writing
- Only write when a value changes, not every loop.
- Spread frequent writes across several addresses (wear levelling) and store a sequence number to find the newest.
- Add a checksum so you can detect a write interrupted by a power cut.
- SPI flash erases to 0xFF in sectors of 4 KB; you can only change bits from 1 to 0 without erasing. Use a library such as SPIMemory or LittleFS to manage it.
- On ESP32 and Pico, the board's own flash can store settings with the Preferences or LittleFS libraries, so an extra chip may not be needed.
Try it: I2C pull-up calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Writing across an EEPROM page boundary.
- Not waiting for the write cycle to finish.
- Writing to memory every loop and wearing it out.
- Leaving write-protect enabled.
- Powering a 3.3 V W25Q flash from 5 V.
Frequently asked questions
How many times can EEPROM be written?
About a million times per cell for external I2C EEPROMs, and about 100,000 for the Uno's internal one.
What is the I2C address of the AT24C256?
0x50 to 0x57 depending on the A0 to A2 pins.
EEPROM or SD card?
EEPROM for small settings; SD card for large files you want to read on a computer.
Can I use the W25Q64 with Arduino Uno?
Yes, but it needs 3.3 V power and level-shifted SPI lines.
What is FRAM?
Ferroelectric RAM: non-volatile memory that writes instantly and survives trillions of writes.
Parts for this guide
- ₹57View
Calculators
Terms in this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

