Introduction to Microcontroller Programming
About PICmicro Chips
Clocking Your PICmicro Devices E-Blocks Flowcode Step By Step
PICmicro Projects
Labs |
EEPROMThis is a convenient point to introduce another facility that the PICmicro can offer you: Electrically Erasable Read Only Memory, or EEPROM. All PICmicro devices have Read Only Memory (ROM), Random Access Memory(RAM), and Electrically Erasable Read Only Memory (EEPROM). ROM is where your program is stored and can not be altered whilst the program runs. RAM is where your variables are stored and this can be written to and read from as your program runs, but the contents are lost as soon as the power is removed from the chip. EEPROM can be written to and read from as your program runs: but the contents are preserved when the power is removed. This means that the contents are available again the next time you use the device. EEPROM is useful in many situations where the settings a user makes need to be preserved for the next time the system is used. For example remembering the frequency a television channel is tuned to. With reference to the previous example:
Reading data back from the EEPROM is very similar to writing data to it: you simply specify a variable where you want to place the data, specify the address you want to read it from. |