Dyethin
Table of Contents
Table of Contents

The difference between RAM ROM FLASH

November 20, 2023

Flash

As a beginner of microcontrollers, I am often confused by the words ROM, RAM, FLASH. From this, write down this C note.


RAM ROM FLASH


ROM program memory


1. The full name of ROM is Read Only Memory, which is translated as read-only memory. As the name suggests, it is a solid-state semiconductor memory that can only read previously stored data. The data stored in ROM is stable. Once the data is stored, it can no longer be changed or deleted, and the stored data will not disappear after a power outage. Its structure is simple, so it is often used to store various firmware programs and data.


2. Used to store program data, variables and constants in microcontrollers.


3. For ease of use and mass production, programmable read-only memory (PROM) and erasable programmable read-only memory (EPROM) have been further developed. EPROM needs to be irradiated with ultraviolet light for a long time to erase, which is very inconvenient to use. In the 1980s, electrically erasable programmable read-only memory (EEPROM) appeared again, which overcomes the shortcomings of EPROM, but is not highly integrated and expensive. As a result, a new type of flash memory (FLASH MEMORY) with a memory cell structure similar to EPROM was developed. FLASH has high integration, low power consumption, small size, and can be quickly erased online, so it has developed rapidly.


Flash memory


Flash memory (Flash EEPROM) is also called flash memory. It is a type of EEPROM. It combines the strengths of ROM and RAM. Not only does it have the performance of electronically erasable and editable (EEPROM), it will not lose data due to power outage and can read data quickly. The biggest difference between it and EEPROM is that FLASH operates on a sector (block) basis, while EEPROM operates on a byte basis. The circuit structure of FLASH is relatively simple, the same capacity occupies a smaller chip area, and the cost is naturally lower than that of EEPROM, so it is suitable for use as program memory.


RAM random access memory


RAM (Random Access Memory) is also called random access memory. The contents of the storage unit can be randomly taken out or stored as needed, and the access speed has nothing to do with the location of the storage unit. This kind of memory will lose its storage content when the power is turned off, so it is mainly used to store programs that are used for a short period of time.


The difference between the three


Regarding the difference between RAM, ROM and FLASH, simply speaking, in computers, RAM and ROM are both data memories. RAM is random access memory, which is characterized by its volatility, that is, it loses its memory when it is powered off. ROM usually refers to solid memory (write once, read repeatedly), which has the opposite characteristics of RAM. ROM is divided into two types: one-time curing, optical erasure and electrical erasure and rewriting.


In applications, ROM is generally used to store firmware, and RAM is used to store data. Because FLASH ROM reads and writes faster than ordinary ROM and is easy to erase and write, it is generally used to store user programs and data that need to be permanently saved. For example, the core of the current household electronic electricity meter is a single-chip computer, and the program of the single-chip computer is stored in ROM. During the working process, the electric meter needs to calculate data, collect voltage and current, and calculate the electric energy based on the voltage and current. Voltage and current are timely data that the user does not care about. It is only used to calculate the electricity. After the calculation, the data collected this time is used up, and then the next collection is collected. Therefore, there is no need to store these values permanently. Put it in RAM. However, the calculated electricity consumption needs to be saved permanently. The microcontroller will store the electricity consumption into FLASH regularly or at the moment of power outage.


Articles you may also like

Characteristics of CPU, GPU, and FPGA

Explanation of the characteristics of CPU, GPU, and FPGA that is simple to comprehend
Read More >

Silicon controlled rectifier (SCR) and switch control circuit explained

Provide a detailed introduction to what a Silicon controlled rectifier (SCR), its structure, and symbols. And discuss the working principle of Silicon controlled rectifier (SCR) and how to test it, listing classic circuits such as controlling motors.
Read More >

Accurately measure resistor value using ADC

Many microcontrollers now have ADC functions, 10-bit or 12-bit. It is very convenient to use ADC to measure voltage. To measure the resistance of a resistor, you can use Ohm's law to divide the voltage and then measure the divided voltage to calculate the resistance of the resistor. value, the simplest resistance measurement circuit is as follows:At this time, the voltage calculatio...
Read More >

What is a GPU? What is the relationship between GPU and graphics card?

This article provides a detailed explanation of what GPU is and the relationship between GPU and graphics cards. And the development history and main parameters of GPU, competitors, etc
Read More >
Becky Boresen
Becky Boresen is a senior electronics engineer specializing in switching components such as transistors, capacitors and connectors. During her career, she has been involved in developing several electronic projects and has successfully driven several technological innovations. She is passionate about continually learning about the latest trends in electrical technology to stay competitive in the industry.
Related Parts
Index: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Newsletter
COPYRIGHT @ 2026 DYETHIN.COM ALL RIGHTS RESERVED