RAM, SRAM, SDRAM, ROM, EPROM, EEPROM, Flash memory concepts

Publisher:HarmoniousCharmLatest update time:2024-08-05 Source: cnblogsKeywords:RAM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Common memory concepts: RAM, SRAM, SDRAM, ROM, EPROM, EEPROM, Flash memory can be divided into many categories. According to whether the data is lost when power is off, it can be divided into RAM (random access memory) and ROM (read-only memory). RAM has a faster access speed, but the data will be lost after power off, while ROM will not lose data after power off.

In a single-chip microcomputer, RAM is mainly used as a runtime data storage, FLASH is mainly used as a program storage, and EEPROM is mainly used to save some data that needs to be saved when the program is running.

FLASH: The place where the program running by the microcontroller is stored.


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


EEPROM: Depends on user needs. It is generally used to store some system parameters, which may or may not need to be modified.


ROM and RAM both refer to semiconductor memories. ROM is the abbreviation of Read Only Memory, and RAM is the abbreviation of Random Access Memory. ROM can still retain data when the system stops powering on, while RAM usually loses data after power failure. A typical RAM is the computer's memory. In addition, some variables are placed in RAM, and some initialization data, such as the content interface to be displayed on the LCD, are placed in the FLASH area (also known as the ROM area in the past). EEPROM can be used or not, and is mainly used to store some running data, which will not be lost after power failure.


RAM can be divided into SRAM (Static RAM) and DRAM (Dynamic RAM). SRAM uses a bistable trigger to store information, so the information will not be lost as long as the power is not lost. DRAM uses MOS (metal oxide semiconductor) capacitors to store charge to store information, so the capacitor must be charged continuously to maintain the information. 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 places with very demanding requirements, such as the first and second level buffers of the CPU. DRAM retains data for a very short time and is slower than SRAM, but it is still faster than any ROM. However, in terms of price, DRAM is much cheaper than SRAM. Computer memory is DRAM.


How memory works: Memory is used to store data and programs that are currently in use (i.e., being executed). The computer memory we usually refer to is dynamic memory (i.e., DRAM). The so-called "dynamic" in dynamic memory means that after we write data to DRAM, the data will be lost after a period of time, so an additional circuit is required to perform memory refresh operations.

The specific working process is as follows: whether a DRAM storage unit stores 0 or 1 depends on whether the capacitor has a charge, with a charge representing 1 and no charge representing 0. However, over time, the capacitor representing 1 will discharge, and the capacitor representing 0 will absorb the charge, which is the reason for data loss; the refresh operation regularly checks the capacitor, and if the charge is greater than 1/2 of the full charge, it is considered to represent 1 and the capacitor is fully charged; if the charge is less than 1/2, it is considered to represent 0 and the capacitor is discharged, thereby maintaining data continuity.


What people usually call SDRAM is a type of DRAM. It is a synchronous dynamic memory that 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 transmission. It is often used in embedded systems.


There are many kinds of ROM. PROM is programmable ROM. The difference between PROM and EPROM (erasable programmable ROM) is that PROM is disposable, that is, after the software is loaded, it cannot be modified. This is an early product and it is impossible to use it now. EPROM erases the original program by ultraviolet light. It is a general-purpose memory. Another kind of EEPROM is electronically erased. It is very expensive, takes a long time to write, and writes very slowly. Mobile phone software is generally placed in EEPROM. When we make a call, some of the last dialed numbers are temporarily stored in SRAM, not immediately written into the record (call records are stored in EEPROM), because there is important work (calls) to do at the time. If it is written, the long wait is unbearable for users.

Flash is also a non-volatile memory (no data loss during power failure). It is easy to erase and write, has fast access speed, and has largely replaced the position of traditional EPROM. Because it has the same characteristics as ROM that data will not be lost during power failure, many people call it Flash ROM. FLASH memory, also known as flash memory, combines the advantages of ROM and RAM. It not only has the performance of electronic erasable programmable (EEPROM), but also does not lose data during power failure and can read data quickly (the advantage of NVRAM). This type of memory is used in USB flash drives and MP3s. In the past 20 years, embedded systems have been using ROM (EPROM) as their storage devices. However, in recent years, Flash has completely replaced the position of ROM (EPROM) in embedded systems, and is used to store bootloaders and operating systems or program codes, or directly as a hard disk (USB flash drive).


Currently, there are two main types of Flash: NOR Flash and NAND Flash. The reading of NOR Flash is the same as the reading of our common SDRAM. Users can directly run the code loaded in NOR FLASH, which can reduce the capacity of SRAM and save costs. NAND Flash does not adopt the random reading technology of memory. It reads one block at a time, 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, in addition to using NAND Flah, also use a small NOR Flash to run the startup code.


Generally, NOR Flash is used for small capacity because of its fast reading speed, and is mostly used to store important information such as operating systems, while NAND FLASH is used for large capacity. The most common NAND FLASH applications are DOC (Disk On Chip) used in embedded systems and the "flash drives" we usually use, which can be erased online. Currently, the FLASH on the market mainly comes from Intel, AMD, Fujitsu and Toshiba, and the main manufacturers of NAND Flash are Samsung and Toshiba.


Keywords:RAM Reference address:RAM, SRAM, SDRAM, ROM, EPROM, EEPROM, Flash memory concepts

Previous article:C language FAQ
Next article:MCU CPU Difference

Recommended ReadingLatest update time:2024-11-23 18:09

PIC16C74 MCU SPI mode read and write serial EEPROM program
; list  p=16C74, st=off ; PORTC PIN DESCRIPTION ; SCK bit 3, SDI bit 4, SDO bit 5, CS bit 7 ; Fosc = 10.0 MHz, thus each instr. cycle = 400ns ;***************Ram Register Definitions*******************************      rxdata equ 25h    addr   equ 26h    loops  equ 27h ;***************Bit Definitions******************
[Microcontroller]
Memory Unit and Bit Address in C51
The RAM in the microcontroller is composed of 8 bits per unit, that is, each 8-bit binary number is a storage unit. The RAM has a total of 256 such storage units. The first 128 units are general storage units, and the last 128 units are special function registers. Each storage unit is like a house, and the rooms in
[Microcontroller]
Labview programming skills-----How to realize memory space sharing
  In C language, file mapping can be used to open up a memory space. Each process and thread can use this shared memory space to exchange data, that is, write and read operations. This involves a question of control permissions. At any time, only one thread or process is allowed to operate on the memory space. Let's lo
[Test Measurement]
Example program for reading and writing 24LCxx series EEPROM
Example program for reading and writing 24LCxx series EEPROM ;********************************************************  ;*                     * ;*    ? PIC16F877A ?I2C Master 家Α???﹃?Α EEPROM ?絛ㄒ祘Α  * ;*                                                   * ;* Written by:  Richard Yang                                *
[Analog Electronics]
s3c2440 memory controller and SDRAM basic test
In the LED and serial port programs we experimented with earlier, the CPU sent the address to a specific register and wrote the corresponding bits in the register to meet the control requirements. The first type is GPIO gate circuits such as LEDs, and the second type is protocol types such as serial ports. These are
[Microcontroller]
s3c2440 memory controller and SDRAM basic test
1.6.2_NOR_FLASH programming_identification
1. Add when compiling: -march = armv4 otherwise, volatile unsigned short *p = xxx; *p = val; //It will be split into 2 strb operations, which is 8 bits, but we want to write 16 bits at a time 2. Turn off the timer interrupt, otherwise the CFI mode will be entered when testing NOR. If an interrupt occurs, the CPU wil
[Microcontroller]
1.6.2_NOR_FLASH programming_identification
MCU STM8L051F3xx EEPROM Operation Notes
MCU: STM8L051F3xx EEPROM Address: 0x00 1000 ~ 0x00 10FF, 256 Bytes Simple operation instructions:  EEPROM is write-protected after power-on reset. When writing data to it, it is necessary to unlock and turn off the write protection. The unlocking process is: 1. Write the key 0xAE to FLASH_DUKR for the first time 2
[Microcontroller]
INS/GPS integrated navigation system based on dual-port RAM chip CY7C028
Among many combined navigation systems, INS/GPS combined navigation system has developed rapidly, and has been widely used in both military and civilian fields, and has received more and more attention. As far as INS/GPS combined navigation system is concerned, in addition to completing a large amount of navigation sol
[Analog Electronics]
INS/GPS integrated navigation system based on dual-port RAM chip CY7C028
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号