Where are the working registers R0~R7 of the 51 MCU located in the internal RAM?

Publisher:安静的夜晚Latest update time:2019-04-19 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

There are 32 working registers in 51 MCU, which are 00H--1FH units in RAM and divided into 4 groups, namely

Group 0: 00H--07H units,

1 group: 08H--0FH unit,

2 groups: 10H--17H units,

3 groups: 18H--1FH units,


The 8 units in each group correspond to R0--R7. Only one of the four groups is the current working register, and the 8 units in the current working register are used in the program. The current working register is determined by the third and fourth bits in the program status word PSW. In PSW, the four states of 00, 01, 10, and 11 of the two-bit combination of PSW4 and PSW3 specify the 0th, 1st, 2nd, and 3rd groups of the working registers, respectively. You only need to use instructions to change the two-bit state of PSW to change the current working register group. In this way, there are actually 32 working registers to choose from.


Reference address:Where are the working registers R0~R7 of the 51 MCU located in the internal RAM?

Previous article:51 Setting variables, arrays, and functions in fixed positions in single-chip microcomputers
Next article:C51/C52 Interrupt (EXTI)

Recommended ReadingLatest update time:2024-11-16 19:50

Static and dynamic display of digital tube on 51 single chip microcomputer
1. Introduction of TX1C digital tube Common cathode and common anode digital tubes. The experimental board has a common cathode digital tube, a 6-bit digital tube. The connection principle diagram is as follows: the segment lines (segment selection lines, i.e. abcdefgh) connected together control which digital tube
[Microcontroller]
Static and dynamic display of digital tube on 51 single chip microcomputer
51 single chip microcomputer (part 26) - independent button digital tube display
In this article, we further study the use of independent buttons and use digital tubes to display the status of the buttons. The main code of this experiment is shown below. main() {     for(n=0;n 8;n++) //Assign initial value to showdata array         showdata =0;     KEY1=1;     KEY2=1;     KEY3=1;     KEY4=1;    
[Microcontroller]
51 MCU software program reset
51 MCU software reset assembly code        POP ACC; pop return address        POP ACC     ; Pop up PC         MOV SP,#30H ; After reset, SP is 07H, which will reset the stack         MOV PSW,#00H ; Clear register         CLR A ; push 0 as new         PUSH ACC ; return address to stack         PUSH AC
[Microcontroller]
The US government recommends that developers stop using C/C++ and switch to memory-safe programming languages
According to news on February 29, the U.S. government recently released a cybersecurity report calling on developers to stop using programming languages ​​that are prone to memory safety vulnerabilities, such as C and C++, and instead use memory-safe programming languages ​​for development. The report was released by
[Embedded]
AT24C02 study notes based on 51 single chip microcomputer IIC communication
introduction I have been learning several serial communication protocols recently and I feel that I have gained a lot. This article is the first article to learn the IIC bus protocol. I will write another article about the PCF8591 IIC communication ADDA conversion chip in the future. About IIC Bus IIC stands for Inter
[Microcontroller]
AT24C02 study notes based on 51 single chip microcomputer IIC communication
MSP430F5438A Memory Flash Read and Write Operations
1. The storage structure of msp430 adopts the von Eman structure, that is, RAM and Flash are uniformly addressed in the same addressing space, without distinction between code space and data space. 2. Flash is stored in segments as the basic structure. Generally, it is divided into three parts: Flash main storage
[Microcontroller]
C8051F020 Single Chip Microcomputer and Its Application in Total Phosphorus Online Automatic Analyzer
1 Overview The C8051F0XX series of MCUs are a new type of mixed signal system-level MCU launched by Cygnal. This series of MCUs contains the CPU core of CIP-51, and its instruction system is fully compatible with MCS-51. The C8051F020 MCU contains 64kB on-chip Flash program memory, 4352B RAM, 8 I/O ports with a
[Microcontroller]
C8051F020 Single Chip Microcomputer and Its Application in Total Phosphorus Online Automatic Analyzer
51 MCU I/O port simulation serial communication implementation method
The commonly used MCS51 and PIC series microcontrollers usually have only one (or no) UART asynchronous serial communication interface. If multiple serial interfaces are required in the application system (for example, in a multi-machine communication system, the host needs to communicate with both the slave and the
[Microcontroller]
51 MCU I/O port simulation serial communication implementation method
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号