06 EEPROM Read Write and Clear in Arduino
EEPROM:-
EEPROM stands for electrically erasable programming read-only memory and is a type of non-volatile memory used in computers, integrated microcontroller for smart cards and remote keyless systems and other electronics devices to store relatively small amount of data but allowing individual bytes to be erased and reprogrammed.
The advantage of an EEPROM memory, apart from the fact that the data stored in non-volatile, is that it is possible to read data from it and also erase it and write data to it, To erase the data, a relatively high voltage is required.
Application of EEPROM with Arduino:-
The microcontroller on the Arduino board has EEPROM. The size of EEPROM in Arduino Uno, Nano and Mini is 1MB (1024 bytes) it can store byte variables. The variables stored in EEPROM kept there,
event when you reset or power off the Arduino. Simply, the EEPROM is permanent storage similar to hard drive in computers.
The EEPROM can be Read, re-write and erased electrically. In case of Arduino you can read and write from the EEPROM easily using the EEPROM library.
EEPROM Library in Arduino IDE:-
Open Arduino IDE and go to File >> Eamples >> EEPROM. there are basics code for EEPROM.
Writing EEPROM:-
#include <EEPROM.h>
Serial.begin(9600);
EEPROM.write(Address, Value);
Serial.print(Address);
Serial.print(" ");
Serial.println(Value);
Reading EEPROM:-
EEPROM.read(Address);
Clear EEPROM:-
EEPROM.write(Address, 0);
No comments: