Memory structure inside the microcontroller

Publisher:SparklingBeautyLatest update time:2015-03-31 Source: diangonKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  Memory is one of the important hardware of computer. There are two types of memory structure of  single chip microcomputer
: one is that program memory and data memory are uniformly addressed, which belongs to Princeton structure, and the other is Harvard structure in which program memory and data memory are separately addressed. MCS-51 adopts Harvard structure.   1. Characteristics of 
  memory Program memory and data memory are completely separated, each with its own addressing system, control signal and specific function. Program memory only stores programs and constants that must be retained at all times, and data memory is usually used to store a large amount of data required for program operation. 
The names related to memory in single chip microcomputer are: program memory and data memory, internal memory and external memory, byte address and bit address. The memory has a certain capacity, and an 8-bit binary number is often used as the basic unit, which is called a byte. The memory has many byte units, which are also identified by binary numbers, called addresses. Most of the addresses of these memory spaces are addressed from zero. 8-bit address 00H ~ FFH, 16-bit address 0000H ~ FFFFH. Since each hexadecimal digit can be directly converted into a four-bit binary digit (such as 0H-0000B, 9H-1001B, FH-1111B, where H represents the hexadecimal digit identifier and B represents the binary digit identifier), we will also refer to two hexadecimal digits as 8-bit binary digits in the future. 
  The working register is composed of RAM, and the I/O interface also works in memory mode. The working register, I/O port latch and data memory RAM are uniformly addressed in the microcontroller. 
  It has a powerful Boolean processor with 256 addressable bits.
  2. The memory addressing space of MCS-51 
  The register structure of MCS-51 microcontroller is shown in the figure. There are six addressing spaces and four physical memory spaces:
  ① The on-chip 4K (0000H-0FFFH) program memory with PC as the address pointer. 
  ② The off-chip 4K+60K (0000H-FFFFH) program memory. 
  ③ 64K data memory outside the chip with data pointer as address. 
  ④ 128 bytes RAM (00H-7FH) and special function register (80H-FFH) with 8-bit address inside the chip. 
  Program memory, 4K program memory space inside the chip, its address is 0000H ~ 0FFFH, and the external EPROM is also addressed from 0000H. In the address range of 0000H ~ 0FFFH, the address overlaps, and the selection of internal and external program memory is controlled by the EA pin signal. 
  When EA = 0, regardless of the size of the PC value, the CPU always accesses the external program memory. For the 8031 ​​chip, there is no program memory inside, and an external EPROM must be connected, so EA must be grounded, that is, when EA = 0. The external program memory is addressed from 0000H, and the addressing range is 64K. When EA = 1, the internal 4K program is executed first, and then the external program is executed after 4K is full. 
The program memory uses the 16-bit program counter PC as the address pointer to address a 64K byte space range. PSEN is used as the read select signal of the program memory. 
  The program memory also stores constants required by the program. The microcontroller uses different instruction forms to distinguish whether it is accessing the program memory or the data memory. Whenever data is taken from the constant table of the program memory, the table lookup instruction MOVC form must be used.

Keywords:MCU Reference address:Memory structure inside the microcontroller

Previous article:Introduction to Microcontrollers
Next article:What is the difference between CPU and microcontroller?

Recommended ReadingLatest update time:2024-11-17 03:05

How to learn to use single-chip microcomputer? Summary of eight steps to learn single-chip microcomputer
Learning to use a microcontroller means understanding the microcontroller hardware structure and the application of internal resources, learning how to initialize various functions in assembly or C language, and how to compile programs to implement various functions. Step 1: Use of Digital I/O Use buttons to input
[Microcontroller]
Determine the order in which the microcontroller keys are pressed
K4, K3: "In and Out" simulation detection keys. Each time K3 is pressed first and then K4, it represents one person "in"; each time K4 is pressed first and then K3, it represents one person "out". Each time one person "in", 1 is added to the original "in" display (the initial state of the "in" display is "b000"); each
[Microcontroller]
Determine the order in which the microcontroller keys are pressed
Ruichengxinwei helps Nanxin launch new wireless charging and fast charging MCU products
In November 2021, Shanghai Nanxin Semiconductor Technology Co., Ltd. (hereinafter referred to as Nanxin), a leading company in the field of power and battery management chips in China, released an MCU product containing Ruichengxinwei's LogicFlash® MTP IP. This new product was jointly developed with Chengdu Ruichengxi
[Mobile phone portable]
51 MCU RAM area division
When introducing the microcontroller resources, we mentioned that STC89C52 has a total of 512 bytes of RAM, which is used to store data. For example, the variables we define are directly stored in the RAM. However, the 512 bytes of RAM in the microcontroller are not equal in status, but divided into blocks. There are
[Microcontroller]
Design of programmable filter for controllable amplifier based on single chip microcomputer
1 Overview Filters are a crucial link in the fields of communication systems, signal processing and data transmission, especially in data acquisition and processing systems, where their performance directly affects the performance of the entire system. Among them, gain and cutoff frequency are important indicators fo
[Microcontroller]
Design of programmable filter for controllable amplifier based on single chip microcomputer
General steps of single chip microcomputer programming
  (1) Analyze the problem and determine the solution and algorithm;   (2) Allocate system resources and storage units;   (3) Draw a program flow chart;   (4) Design the program and repeatedly debug and modify it.   Colorful Light Cycle Design   ORG 0000H   MAIN: MOV P1, #80H ;D7 light   MOV P1, #40H ;D6 ligh
[Microcontroller]
General steps of single chip microcomputer programming
ICCV7 For AVR Tutorial Atmega16 MCU
1 How to use ICCV7 For AVR to build a microcontroller program project 1.1 Create a new English folder on the desktop Cannot use Chinese name. 1.2 Open ICCV7 For AVR Click New Select Folder Write the file name, don't write Chinese characters Click Save At this point, the project has been created. The project refe
[Microcontroller]
ICCV7 For AVR Tutorial Atmega16 MCU
Design of digital capacitance meter based on 51 single chip microcomputer
Design Task Design and make a digital capacitance meter. The functions and requirements of the system are as follows: (1) The capacitance meter can measure capacitance less than 2μF. (2) The capacitance meter uses a 3.5-digit display, and the maximum display value is 1999. (3) The reading unit of the capac
[Microcontroller]
Design of digital capacitance meter based on 51 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号