51 MCU reset status

Publisher:游走人间Latest update time:2013-02-27 Source: 21IC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The reset operation of the MCU puts the MCU into the initialization state, which includes setting the program counter PC = 0000H, which means that the program starts to execute from the address unit 0000H. After the MCU is cold started, the on-chip RAM is a random value. The reset operation in operation does not change the content in the on-chip RAM area. The state of the 21 special function registers after reset is a fixed value, as shown in the table below.

It is worth pointing out that remembering the main states of some special function registers after reset is necessary to understand the initial state of the microcontroller and reduce the initialization part in the application program.

Note: The symbol * in the table indicates a random state;

A=00H, indicating that the accumulator has been cleared;

1.jpg

PSW=00H, indicating that register group 0 is selected as the working register group;

SP = 07H, indicating that the stack pointer points to the 07H byte unit of the on-chip RAM. According to the stack operation rule of first adding and then pushing, the first content pushed is written to the 08H unit;

Po-P3 = FFH, indicating that 1 has been written to each port line. At this time, each port can be used for both input and output;

IP=×××00000B, indicating that each interrupt source is at a low priority;

IE=0××00000B, indicating that all interrupts are turned off;

System reset is the first step of any microcomputer system, which makes the whole control chip return to the default hardware state. The reset of 51 single chip microcomputer is controlled by RESET pin. After this pin is connected to high level for more than 24 oscillation cycles, 51 single chip microcomputer enters the internal reset state of the chip and waits in this state until RESET pin turns to low level, then checks whether EA pin is high or low level. If it is high level, the program code inside the chip is executed, if it is low level, the external program is executed.

When the 51 microcontroller is reset, some important registers inside it are set to specific values ​​(detailed explanation will be given when introducing special registers). The data in the internal RAM remains unchanged.

Reference address:51 MCU reset status

Previous article:Debugging of 51 MCU
Next article:Design of 16×16 LED Chinese Character Scrolling Display Screen Based on AT89C51 Single Chip Microcomputer

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

Introduction to the Principle of 51 MCU Reset Circuit
Working principle of reset circuit: It is introduced in the book that to reset the 51 single-chip microcomputer, it only needs to connect a high level to the 9th pin for 2us. How is this process realized? In the single-chip microcomputer system, the system is reset once when it is powered on, and the system is reset a
[Microcontroller]
Introduction to the Principle of 51 MCU Reset Circuit
51 single chip microcomputer controls the forward and reverse rotation of the motor
Proteus simulation schematic diagram of a DC motor with controllable forward and reverse rotation: The microcontroller source program is as follows: #include reg51.h #define uchar unsigned char #define uint unsigned int sbit K1=P3^0; sbit K2=P3^1; sbit K3=P3^2; sbit P1_0=P1^0; sbit P1_1=P1^1; void motor_start(); vo
[Microcontroller]
51 single chip microcomputer controls the forward and reverse rotation of the motor
STC51 MCU SPI interface single master single slave mode communication - assembly language
;============================================ ;STC12C5410 spi communication ; Single master and single slave mode ;============================================ ;MASTER EQU 1 ;Master microcontroller MASTER EQU 0 ; Slave ;---------------------------------------- ;Define COM baud rate auto-reload constant ;
[Microcontroller]
Simulation and source code of 51 single chip microcomputer ADC0809 digital tube displaying light intensity
51 single chip microcomputer ADC0809 digital tube displays light intensity. Please download the source code and simulation files by yourself. The simulation schematic diagram is as follows The MCU source code is as follows: #include reg52.h   #include intrins.h #include absacc.h   #define uchar unsigned char #defin
[Microcontroller]
Simulation and source code of 51 single chip microcomputer ADC0809 digital tube displaying light intensity
Learning 51 MCU-Key interrupt detection
      Following yesterday, let's continue to talk about buttons. Yesterday we talked about scan detection, today we will talk about interrupt detection. Let me tell you a little story first~~       When Kaikai and I were learning microcontrollers, I used the scanning detection method to do the project, and he used t
[Microcontroller]
Learning 51 MCU-Key interrupt detection
Application of AT89S51 grating system in machine tool transformation
1. Working principle of grating ruler displacement measurement The grating is composed of a light source, a lens, a scale grating (main grating), an indicator grating (sub-grating) and a photoelectric element. When the main grating and the sub-grating are placed at a small angle θ relative to each other, the lines on
[Microcontroller]
Application of AT89S51 grating system in machine tool transformation
Design of robot with road learning and memory based on AT89C51 microcontroller
With the continuous development of science and technology, robot technology has been widely used and developed in aerospace, marine, military, construction, transportation, industry and service industries. In some special occasions (such as aerospace, deep-sea operations, nuclear industry, etc.), robotic technologies
[Microcontroller]
Design of robot with road learning and memory based on AT89C51 microcontroller
Design of variable frequency speed control system based on AT89C51 single chip microcomputer
1. Overview In the field of electrical transmission, with the continuous improvement of the technical level of self-shutoff devices, pulse width modulation technology (PWM technology for short) has also become increasingly mature. PMW AC variable frequency speed regulation has been widely used in undergroun
[Microcontroller]
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号