PIC microcontroller and different EEPROM sizes

eeprompic

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?

RESOLUTION:

Peep Dan Laks' answer below…

Best Answer

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.