Differences between RAM, SRAM, SDRAM, ROM, EPROM, EEPROM, and Flash memory

Common memory concepts: RAM, SRAM, SDRAM, ROM, EPROM, EEPROM, Flash memory can be divided into many types, which can be divided into RAM (random access memory) and ROM (read only memory) according to whether the power-down data is lost. The access speed of RAM is relatively fast, but the data will be lost when the power is turned off, while the data will not be lost when the ROM is powered off.

In a single-chip microcomputer , RAM is mainly used for runtime data memory, FLASH is mainly program memory, and EEPROM is mainly used to save some data that needs to be powered off without losing when the program is running.
FLASH: The place where the program running by the microcontroller is stored.

SRAM: Storing temporary data generated during the operation of the microcontroller.

EEPROM: It depends on the user's needs. It is generally used to store some parameters of the system. These parameters may or may not be modified.

  Both ROM and RAM refer to semiconductor memory, ROM is the abbreviation of Read OnlyMemory, and RAM is the abbreviation of Random AccessMemory. ROM can still retain data when the system is powered off, while RAM usually loses data after a power failure. A typical RAM is the memory of a computer. In addition, some variables are placed in RAM, and some initialization data, such as the content interface to be displayed by the LCD, are placed in the FLASH area (that is, the ROM area previously mentioned). EEPROM is available or not, mainly for storage Some running data   can be divided into SRAM (Static RAM/Static Memory) and DRAM (DynamicRAM/Dynamic Memory) after power failure without losing RAM. SRAM uses bistable flip-flops to store information. As long as the power is not turned off, the information will not be lost. DRAM uses MOS (Metal Oxide Semiconductor) capacitors to store charges to store information. Therefore, information must be maintained by constantly charging the capacitors. Therefore, the cost, integration, and power consumption of DRAM are significantly better than SRAM. SRAM is very fast and is currently the fastest storage device for reading and writing, but it is also very expensive, so it is only used in demanding places, such as the first-level buffer and the second-level buffer of the CPU. DRAM retains data for a short time and is slower than SRAM, but it is still faster than any ROM, but in terms of price, DRAM is much cheaper than SRAM, and computer memory is DRAM.


 The working principle of memory: memory is used to store the data and programs currently in use (that is, executing), the computer memory we usually refer to refers to dynamic memory (ie DRAM), the so-called "dynamic" in dynamic memory , which means that when we write data into DRAM, after a period of time, the data will be lost, so an additional circuit is required for memory refresh operation. 

The specific working process is as follows: whether a DRAM memory cell stores 0 or 1 depends on whether the capacitor has charge, with charge representing 1, and no charge representing 0. But over time, the capacitor representing 1 will discharge, and the capacitor representing 0 will absorb charge, which is the reason for data loss; the refresh operation checks the capacitor regularly, if the power is greater than 1/2 of the full power, it is considered to represent 1 , and fully charge the capacitor; if the power is less than 1/2, it is considered to represent 0, and the capacitor is discharged to maintain the continuity of the data.
 And what people usually call SDRAM is a kind of DRAM, which is a synchronous dynamic memory, which uses a single system clock to synchronize all address data and control signals. Using SDRAM can not only improve system performance, but also simplify design and provide high-speed data transfer. Often used in embedded systems.

 There are also many kinds of ROM. PROM is programmable ROM. The difference between PROM and EPROM (erasable programmable ROM) is that PROM is one-time, that is, after the software is poured in, it cannot be modified. This is the early stage. The product of EPROM is now impossible to use, and EPROM is a general-purpose memory that erases the original program through ultraviolet light irradiation. Another type of EEPROM is erased electronically, which is expensive, takes a long time to write, and is slow to write. The mobile phone software is generally placed in the EEPROM. When we make a call, some of the last dialed numbers are temporarily stored in the SRAM, and are not written into the pass record immediately (the call record is saved in the EEPROM), because there is a very important work (call) at that time. Do, if writing, the long wait is unbearable for the user. 

 Flash is also a kind of non-volatile memory (it will not be lost when power off), it is easy to erase and write, and has fast access speed, which has greatly replaced the status of traditional EPROM. Because it has the same characteristics as ROM, it will not be lost when power off, so many people call it FlashROM. FLASH memory, also known as flash memory, combines the advantages of ROM and RAM. It not only has the performance of electronically erasable and programmable (EEPROM), but also does not lose data when power off and can quickly read data (the advantage of NVRAM). U disk And MP3 is used in this kind of memory. In the past 20 years, embedded systems have been using ROM (EPROM) as their storage devices. However, in recent years, Flash has completely replaced ROM (EPROM) in embedded systems and is used to store bootloaders and operating systems or programs. code or use it directly as a hard disk (U disk). 

  At present, there are two main types of Flash, NOR Flash and NADN Flash. The reading of NORFlash is the same as the reading of our common SDRAM. Users can directly run the code loaded in NORFLASH, which can reduce the capacity of SRAM and save costs. NANDFlash does not use the random read technology of memory. Its reading is carried out in the form of one read and one fast, usually 512 bytes at a time. Flash using this technology is relatively cheap. Users cannot directly run the code on NAND Flash, so many development boards that use NAND Flash use a small NORFlash to run the startup code in addition to using NAND Flash.

  Generally, small-capacity NORFlash is used because of its fast reading speed and is mostly used to store important information such as operating systems, while large-capacity NAND FLASH is used. The most common NANDFLASH applications are DOC (Disk On Chip) used in embedded systems and our The commonly used "flash disk" can be erased online. At present, FLASH on the market mainly comes from Intel, AMD, Fujitsu and Toshiba, while the main manufacturers of NANDFlash are Samsung and Toshiba.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324526367&siteId=291194637