MCU program RAM, ROM, Flash

Publisher:CelestialSoulLatest update time:2013-12-02 Source: 21icKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

8K flash has 8*1024 bytes. An instruction may have 1~4 machine codes, that is, 1~4 bytes. Among them, instructions with 1~2 machine codes are the most frequently used. So in this way, about 4000~8000 instructions can be written. General applications cannot write so many instructions. However, it may exceed the budget to store other data, such as Chinese characters and digital dot matrix codes. For the situation that it is really not enough, it is recommended that the host directly buy a large-capacity chip. Expanding flash is not very desirable, which increases the instability of the system, increases the area of ​​the board, and makes wiring difficult. If you really want to expand the capacity, there are many ways. Expand EEPROM (currently 256K~1M), or expand the flash memory based on SPI bus (mainstream 32M~128M). The drivers of these two buses are simple and easy to expand.

MCU FLASH is mainly used as program storage, which is to replace the previous ROM. The biggest advantage is that it reduces the cost of the chip and can be electrically erased. At present, the life of MCU FALSH on the market varies greatly, with erasure times ranging from 1,000 to 100,000, but the storage time can be guaranteed for 40 years. Pay attention when choosing. Some cheap MCUs do not use expensive EEPROM to integrate power-down data storage, but use FALSH. However, it should be noted that its life is up to 100,000 times, and it cannot be erased byte by byte. It should be noted that whether its life meets the requirements in the occasion of use.

RAM is a data storage device, similar to the memory in a computer. It is mainly used to store process data during program operation. After power failure, the previous data will be lost, so the program needs to be initialized when powered on, otherwise the data after power on will be a random number, which may cause the program to crash.

ROM is the program memory. The data will not be lost after power failure, but the data will not change during the program running. The ROM of the early microcontrollers has been replaced by the current FLASH memory because of the trouble of erasing and modifying, the high price or the inability to modify the data of the cheap OTP type. Because FLASH is easy to erase and write, some microcontrollers now support online internal programming. The content of FALSH can be modified through a specific program execution method, and the program memory can be modified online. This does not conflict with the above-mentioned content of the program memory cannot be changed during operation, because when the program is running normally, its content will not change and it only works in a read-only state.

Keywords:MCU Reference address:MCU program RAM, ROM, Flash

Previous article:Design and Implementation of NAND Flash Management Algorithm
Next article:Design and Application of Encrypted Storage Chip AT88SC1616

Recommended ReadingLatest update time:2024-11-17 02:52

Introduction to AT89S52 microcontroller_Main performance and registers of AT89S52 microcontroller
AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K system programmable Flash memory. Manufactured using Atmel's high-density non-volatile memory technology, it is fully instruction- and pin-compatible with industrial 80C51 products. On-chip Flash allows the program memory to be programmable in
[Microcontroller]
Introduction to AT89S52 microcontroller_Main performance and registers of AT89S52 microcontroller
Learn 51 MCU timer from scratch
The schematic diagram of the timer circuit based on the microcontroller is shown below: The first thing we learned when we studied microcontrollers was how to make LEDs flash, which was done using a delay program. Looking back now, this was not very appropriate. Why? Our main program made the light flash, so we c
[Microcontroller]
Learn 51 MCU timer from scratch
Development and manufacture of 80C196 single chip microcomputer multifunctional teaching experiment board
With the continuous development of microcomputer technology, the application of single-chip microcomputers in many engineering fields has become increasingly widespread and has gradually replaced single-board computers. In order to adapt to the changes in this new situation, many universities and some secondary tech
[Microcontroller]
Development and manufacture of 80C196 single chip microcomputer multifunctional teaching experiment board
Application of CH375_CH376 USB disk read and write module on 51 single chip microcomputer
The circuit diagram is as follows:   ch375 data sheet:   Wiring diagram for this program: The MCU source program is as follows (host.c file): /*  **************************************** ** Copyright (C) W.ch 1999-2004 ** **************************************** ** USB Host File Interface for CH375 ** ** TC2.0@PC,
[Microcontroller]
Application of CH375_CH376 USB disk read and write module on 51 single chip microcomputer
Design of CCD drive circuit based on C8051F300 single chip microcomputer
1 Commonly used CCD drive timing generation methods There are many CCD manufacturers with different models, and the methods of generating driving timing are also varied. Generally, there are the following four methods: (1) Digital circuit driving method This method uses digital gate circuits and timing circuits to dir
[Microcontroller]
Design of CCD drive circuit based on C8051F300 single chip microcomputer
MCS-51 single-chip microcomputer program example and detailed explanation of controlling light flashing
If you want to make the light flash continuously, it will have certain practical value, for example, it can be used as a gas. How can you make the light flash continuously? In fact, it means that the light should be on for a period of time and then off for a period of time, that is, P10 should continuously output high
[Microcontroller]
MSP430G2553 flash operation example
/* Actually applicable to MSP430x2xx series MCU, including the following 10 commonly used functions:  (1) Initialization. Flash_Init (unsigned char Div, unsigned char Seg): Set the Flash timing according to the SMCLK frequency. The frequency division coefficient of the clock is determined by the Seg segment number to
[Microcontroller]
Design of wireless transmission system for well site instrument parameters based on single chip microcomputer
1 Introduction At present, wired data transmission is basically used at oil field drilling sites across the country. Wired transmission has many disadvantages. On-site wiring is complicated and there are safety hazards. Drilling is a mobile operation. Every time a well is drilled, the wiring must be re-laid, wh
[Microcontroller]
Design of wireless transmission system for well site instrument parameters based on single chip microcomputer
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号