EEPROM

Photo of author

By Jackson Taylor

EEPROM

ATmega328 – 1KB

ATmega8 & ATmega168 – 512 bytes

Data should be in byte (8 bit) format ,ie, 8 bit data only

Functions

read()  — Reads a byte. – -Syntax – EEPROM.read(address)

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

write() –  -Write a byteSyntax –EEPROM.write(address, value)

Notes

An EEPROM write takes 3.3 ms to complete.

100,000 write/erase cycles only

Program

//writes a letter E to EEPROM and read it from EEPROM and send to serial port

#include <EEPROM.h>
void setup()
{
    Serial.begin(9600);
    EEPROM.write(10,'E');
    delay(10);
}
void loop() {
    char a =EEPROM.read(10);
    Serial.println(a);
}
See also
8051

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works