Let’s start with some fundamental Memory Concepts which have been with us since the dawn of the computer era;
- RAM (Random Access Memory). Volatile, lost when powered off. Holds variables and data generated by a program.
- ROM (Read Only Memory). Retained when powered off. Holds permanent data. In early home computers this was BASIC.
- EPROM (Erasable Programmable Read Only Memory). Non-volatile. Historically was erased by ultraviolet light if a rewrite was needed.
Over time the technology improved (doesn’t it always!) and now memory is implemented in modern microcontroller’s (MCU’s) by;
SRAM: (Static RAM). Storage of the temporary data generated during the operation of the microcontroller.
Flash (Non-Volatile memory) is typically where the program (i.e. a sketch in Arduino parlance) is loaded onto the microcontroller.
EEPROM (Electrically Erasable Programmable ROM). Used to save data after power-off. For example, used to semi-permanently store key parameters of the system, these parameters may need to be modified, or not, in later usage.
Below is a block diagram of the hugely popular Microchip ATmega328P microcontroller (as used by Arduino) showing Flash, SRAM and EEPROM in the chip architecture:

Read on for a deeper dive into MCU memory technology.
RAM technology can also be divided into SRAM (static ram/quiescent memory) and DRAM (Dynamic ram/dynamic memory). SRAM uses a bistable trigger to save information, and while power remains, the information remains. DRAM uses a MOS (metal oxide semiconductor) capacitor to store the information. This means maintaining the information requires charging the capacitor continuously. SRAM is the fastest way to read and write data however it is more expensive. DRAM retains data for a short period of time (i.e. until the capacitor discharges) and so requires refreshing, is slower than SRAM, but it is faster than ROM, and is cheaper than SRAM. Solid state computer memory for example is DRAM, and computer cache memory (where speed is critical) is often SRAM.
Flash is also a non-volatile memory type (i.e. if the device powers down the data will be retained). It is fast, easy to erase, and has to a degree replaced the traditional EPROM technology. In common usage Flash is referred to as ‘Flash ROM’ because it has the same characteristics of usage even though the underlying technology is different.
Flash is also known as ‘Flash Memory’ and is a non-volatile storage technology that is electrically erased and reprogrammed. The two main types of flash memory are NOR Flash and NAND Flash and are named after the NOR & NAND logic gates because they are analogous to the operation of their respective Flash memory types.
Flash memory was invented by Toshiba in 1980 and is based on EEPROM technology. Toshiba began marketing flash memory in 1987.
The NAND type is found in memory cards, USB flash drives, solid-state drives, smartphones, storage and transfer of data. A key disadvantage of flash memory is that it can only endure a relatively small number of write cycles within a specific block. Flash memory has fast read access time, but it is not as fast as SRAM or ROM. Flash is the preferred technology for mobile devices owing to its mechanical shock resistance.
Flash has a speed advantage over non-flash EEPROM for writing large amounts of data and costs less than byte-programmable EEPROM. Thus it has become the dominant memory type wherever a system requires a significant amount of non-volatile solid-state storage. EEPROMs are still used in applications that require only small amounts of storage. The more recent Arduino models no longer have EEPROM.


Leave a comment