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.
Previous article:C language FAQ
Next article:MCU CPU Difference
Recommended ReadingLatest update time:2024-11-23 18:09
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- CMOS circuit design, layout and simulation
- [SAMR21 new gameplay] 2. Download BOOTLOADER
- PCB trace width, current relationship calculation tool
- [Zero-knowledge ESP8266 tutorial] Quick Start 16 Use of WiFiScan library to scan WiFi near you
- Here is a flyback switching power supply built with TOP series switching IC, undervoltage protection. I have a question here. Please leave.
- Fixed-point DSP fractional multiplication and addition calculation
- Abnormal erasure of data in the information segment of the msp430 MCU, please help me
- FPGA Image Processing Series - Implementing Window Processing
- New Power Ferrite Core and Its Application
- Micro open source USB development board