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)
write() – -Write a byte—Syntax –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);
}