MCU internal resources

Publisher:CelestialGardenLatest update time:2016-12-23 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The internal resources of the MCU I am talking about here are different from the internal structure of the MCU described in traditional MCU books. The internal resources I am talking about here refer to the things that the MCU provides us with for use as MCU users. In summary, there are three major resources:

Flash: Program storage space. Early microcontrollers used OTPROM.

RAM: data storage space.

SFR: Special Function Register.


1) Flash

In the early single-chip microcomputers, OTPROM (One Time Programmable Read-Only Memory) was mainly used to store the program of the single-chip microcomputer. The program could only be written once. If it was found to be wrong, there was no choice but to replace it and rewrite it. With the development of technology, Flash has become the program memory of most single-chip microcomputers with its advantages of repeated erasing, large capacity and low cost. For single-chip microcomputers, the greatest significance of Flash is that data will not be lost after power failure. This concept is similar to the hard disk of our computer. We save movies, documents, music and other files. After turning off the power, all the files will still exist when the computer is turned on again next time.


2) RAM

RAM is the data storage space of the microcontroller, which is used to store the data generated and needed during the program running. It is similar to the memory of the computer. In fact, the most typical analogy is our calculator. When we use the calculator to calculate addition and subtraction, some intermediate data will be saved in RAM. The data will be lost after the power is turned off, so every time we open the calculator, we start the calculation from zero. However, its advantages are, first, the read and write speed is very fast, and second, it can be written unlimited times in theory, that is, the life is unlimited, no matter how the program runs or how it is read and written, it will not break.


3) SFR

The third resource is SFR, special function register. You may not understand this concept at first, but you must remember it. The microcontroller has many functions, each of which corresponds to one or more SFRs. We realize the various functions of the microcontroller by reading and writing SFRs.


At this point, let's learn about 51 MCU. Usually, when we talk about 51 MCU, we are referring to a series of MCUs compatible with Intel MCS-51 architecture, and 51 is a popular abbreviation for it. Many semiconductor manufacturers around the world have launched countless MCUs in this series, such as Atmel's AT89C52, NXP (Philips)'s P89V51, and Hongjing Technology's STC89C52... The specific models vary greatly, but their basic principles and operations are the same, and the program development environment is also the same. Here we need to distinguish the relationship between the general term 51 and the specific MCU models.


Now that we know the three main parts of the microcontroller's internal resources, we will choose the STC89C52 microcontroller for study. STC89C52 is a 51-core microcontroller produced by Hongjing Technology. It has a standard 51 architecture and all 51 standard functions. The program download method is simple and convenient for learning. We will use it to learn microcontrollers. Its resources are as follows:

The Flash program space is 8K bytes (1K=1024, 1 byte = 8 bits);

The RAM data space is 512 bytes;

We will mention and apply SFR one by one later.


Keywords:MCU Reference address:MCU internal resources

Previous article:Preparation for MCU learning
Next article:Download the program to the microcontroller

Recommended ReadingLatest update time:2024-11-16 14:44

The function of the watchdog circuit
The function of the watchdog circuit The watchdog circuit is actually an independent timer with a timer control register that can set the time (turn on the dog). When the time is reached, it must be reset (feed the dog). If not, it is considered that the program has run away and a RESET instruction will be issued.
[Microcontroller]
The function of the watchdog circuit
Teach you to learn 51 single chip microcomputer step by step: C language basics and the realization of running lights
1. Base Binary: 0 and 1 prefix 0b Hexadecimal: four binary digits per bit, 0 to 9 plus A to F (or a to f) prefix 0x 2. C language variable type and range Character type, integer type, long integer type, floating point type. Each type is divided into signed/unsigned. Except for the different lengths, the first thre
[Microcontroller]
Power Timing Socket Made with PIC Microcontroller
This power timing socket has three operation buttons S1, S2, S3, and uses two LED digital tubes to display the timing time. The two buttons S2 and S3 are used to preset and set the timing time values ​​of the ones and tens digits respectively. The setting time adjustment range is 0 ~ 99 minutes. The S1 button is use
[Microcontroller]
Power Timing Socket Made with PIC Microcontroller
Summary of MCU LED light flashing experiment_Fun with 51 MCU (1): Light up the LED light
01 New project and lighting of small LED lights. LED lights are light-emitting diodes. They have unidirectional conductivity. For light-emitting diodes, it is necessary to select a suitable current-limiting resistor based on its voltage drop and rated current. Open the Keil4 software. Select Project, New uVision Proje
[Microcontroller]
Summary of MCU LED light flashing experiment_Fun with 51 MCU (1): Light up the LED light
Design of solar lawn lamp based on 51 single chip microcomputer
As the earth's resources become increasingly scarce and the investment cost of basic energy sources increases, solar energy, as an inexhaustible, safe and environmentally friendly new energy source, is receiving more and more attention. Various types of solar landscape decoration products have also emerged. Solar lawn
[Microcontroller]
Design of solar lawn lamp based on 51 single chip microcomputer
DIY 12-channel 315M remote control decoded by 51 single-chip microcomputer
A remote control socket made a long time ago, with 12-channel decoding through a single-chip microcomputer. Schematic PCB  Internal structure  Panel: The red indicator light is the inspection indicator light, and the green indicator light is the channel working indicator light. code: #include
[Microcontroller]
DIY 12-channel 315M remote control decoded by 51 single-chip microcomputer
51 single chip microcomputer realizes key-to-key addition and subtraction program
************************************************************************/ /********Key counting 0-99 long press continuous addition or subtraction experiment******************/ /********Press K1 to add one, continue to add one after a certain time, after adding to 99, pressing K1 is invalid*******/ /********Press
[Microcontroller]
Research on Data Acquisition and Wireless Transceiver System Based on Single Chip Microcomputer
0 Introduction Data acquisition technology is an important branch of information science. It is not only used in intelligent instruments, but also widely used in modern industrial production and military science. Whether it is process control, state monitoring, fault diagnosis, or quality inspection, data acquisition
[Microcontroller]
Research on Data Acquisition and Wireless Transceiver System 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号