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;
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.
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
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Fundamentals and Applications of Single Chip Microcomputers (Edited by Zhang Liguang and Chen Zhongxiao)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Registration for the first half of 2019 software exam is now open
- OP-07 read voltage
- How to set individual trace solder mask windows in DXP?
- Controlling GaN power stages with the TI Hercules LaunchPad development kit
- Lora parameter calculation and RF transmission distance calculation formula and tools
- Common problems in debugging TMS320C2000 series?
- EEWORLD University Hall----Introduction to TI DLP? display technology in new display applications
- [GD32E231 DIY Contest]——01. Install GD32E231 chip support package
- Ideas on driving safety system
- New circuit principle