What is the significance of how big the EEPROM is for a microcontroller. I'm trying to select another PIC (first one I chose - PIC16LF1827 - didn't have enough RAM for the application I needed it for) and am unsure what I gain/lose by having less than 256 EEPROM or greater.

Also, HEF (High Endurance Flash)-- does that really add anything to the functionality or rather to things that may be background to the functionality but still important?


Peep Dan Laks' answer below...

  • 3
    \$\begingroup\$ Depends on whether or not you use the EEPROM. \$\endgroup\$ Aug 20, 2014 at 3:55
  • \$\begingroup\$ @IgnacioVazquez-Abrams Thanks for the quick reply. However, could you elaborate? \$\endgroup\$ Aug 20, 2014 at 4:17
  • \$\begingroup\$ If your program uses 0 bytes of EEPROM then it doesn't matter how large it is. \$\endgroup\$ Aug 20, 2014 at 4:22

1 Answer 1


A microcontroller may have several different kinds of memory that serve different purposes. I'll go through all to highlight the differences.

Regular program memory is where your compiled program resides. It's probably the largest bank of memory on the chip (as large as megabytes, but can be as small as a few kilobytes). Since you typically don't overwrite the program memory very often, the FLASH memory used here may not have a very high endurance. Maybe no more than 10,000 write-cycles before you can no longer trust its integrity. Also, this type of memory must be erased and programmed in large chunks at a time.

Many microcontrollers allow the firmware to overwrite its own program memory space. But with the limited number of write-cycles available, manufacturers began introducing a small segment of program memory space that was advertised as "High Endurance Flash". If the firmware developer kept any run-time program memory modifications to just that chunk of HEF program memory, they were guaranteed orders of magnitude more write-cycles before the FLASH memory became unreliable. This chunk is typically small compared to the total size of program memory available. Like regular FLASH program memory, HEF must be erased and written in large chunks, making it inconvenient to use as quick storage of run-time values.

EEPROM stands for Electronically Erasable Programmable Read-Only Memory. The awkwardly long acronym is legacy from the "old-fashioned" way of erasing ROM chips. UV light was involved. There was something about dinosaurs too. I don't know, it was a long time ago. Anyway, EEPROM is non-volatile memory for run-time use. It allows the firmware to write and erase a few bytes at a time, much more conveniently than storing run-time parameters in program memory. Plus, its write endurance is typically an order of magnitude or more than regular program memory (but about the same as HEF). It's kind of like "scratch pad" memory that the developer can use to store data that they want to retrieve after a power-down cycle.

The last memory category, RAM, probably doesn't need a description here.

  • \$\begingroup\$ Well, you should probably mention that it's SRAM rather than DRAM. \$\endgroup\$ Aug 20, 2014 at 5:12
  • 1
    \$\begingroup\$ If the embedded device has some sort of user interface with an Options menu or the like, then the EEPROM is a good place to put the changes resulting from navigating and saving the options settings. There are various levels of complexity, e.g. sometimes multiple copies of the data are kept along with checksums in case the power is removed just as the MCU is saving new values off to the EEPROM, causing that copy to be corrupted. \$\endgroup\$
    – tcrosley
    Aug 20, 2014 at 6:15
  • \$\begingroup\$ @DanLaks Thank you so much for that answer. Yeah, I was hoping someone would break it down for me. You're one of the nicer dudes that post in the EE stack exchange. \$\endgroup\$ Aug 21, 2014 at 1:55

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.