According to the block diagram above, since we already have Program Memory, which may be used to store our program, why should we still need EEPROM? What is it for?
1 Answer
See EEPROM#Related_types on Wikipedia. Your Program Memory is likely flash memory, which you'll flash (i.e. completely erase and rewrite) with your program every time you like to change it. 8KB is smaller than the usual size of blocks for flash memory, so its unlikely that you can erase only a half or a quarter of your Program Memory.
The program itself may store small quantities of information (a few bytes for important data) without erasing itself by using the EEPROM, which can be written to bytewise (or wordwise).
So the EEPROM is like a tiny hard disk and the Program Memory is more like a tiny rewritable CD.
-
$\begingroup$ What kind of "important data", or according to wiki, some program config, will be stored in EEPROM? Can you give some examples? Thanks~ $\endgroup$– AlbertKApr 11, 2013 at 17:03
-
$\begingroup$ Depends on the application: e.g. some calibration parameters of an attached meter, a cryptographic key (e.g. for wifi), the desired temperature of your heating system, the order of your TV channels etc. $\endgroup$– fraflApr 11, 2013 at 20:28