PIC16F887 Block Diagram

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 1


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$
    – AlbertK
    Commented Apr 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$
    – frafl
    Commented Apr 11, 2013 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.