what is the difference between flash and EEPROM?
EEPROM is an evolution of the older UV-erasable EPROMs. EEPROM’s “EE” stands for “Electrically Eraseable”.However, despite it being an improvement to its old pal, today’s EEPROM’s way of holding information is the exact same of the flash memory.
The ONLY major difference between the two is the read/write/erase logic.
NAND Flash (regular flash):
Can only be erased in pages (aka. blocks of bytes). You can read and write (over unwritten) single bytes, but erasing requires wiping out a lot of other bytes.
In microcontrollers, it’s generally used for firmware (code) storage. Some implementations support flash handling from within the firmware, in which case you can use that flash to hold information as long as you don’t mess with used pages (otherwise you’ll erase your firmware).
NOR Flash (aka EEPROM):
Can read, write and erase single bytes. Its control logic is laid out in such way that all bytes are accessible individually.
Although it’s slower than regular flash, this feature benefits smaller/older electronic devices. For instance, Odometers use EEPROMs, TVs and monitors used EEPROMs to hold user configurations such as bright, contrast, etc.
In microcontrollers, that’s what you generally use for holding configurations, states or calibration data. It’s better than flash for that as for erasing a single byte you don’t have to keep the contents of the page in RAM to rewrite it after modifying.
There’s a common misconception that NOR Flash uses NOR gates while NAND Flash uses NAND gates (and in fact it seems obvious).
However that is not true. The reason for the naming is the resemblance of the control logic – using Floating -gate MOSFETs– of each memory type with the NAND and NOR gate schematic symbols.
The question that should be popping to your head right now is if the flash is intended to the firmware is it possible to write on flash in run time??
In-System Self-programmable flash
if you are familiar with Atmel MCUs ,then you’ve heard this expression before. simply it means the microcontroller can update its own flash while running.
The feature is usually used to update code in the field. The trick is that you need to leave some code in the system while the main program is being updated, called the bootloader. This scheme is used in the Arduino system to program the chip via UART interface .
This concludes the difference between flash and EEPROM,in the next article we’re gonna explain the bootloader and show a hands on example on how to write on the flash in run time using a simple bootloader on the ATmega32 MCU.
If you any question concerning the article, you can leave it as a comment.follow us on our facebook page and stay tuned.