We already know that the symbols R7 and R6 in the program represent RAM units, which are used to store data. Now let's take a look at the meanings of other symbols.
DELAY: MOV R7, #250; (6)
D1: MOV R6, #250; (7)
D2: DJNZ R6, D2; (8)
DJNZ R7, D1; (9)
RET; (10)
|
|
〈MCU Delay Program〉
The RST pin maintains a high level for more than 2 machine cycles.
⒊ CPU status after reset
PC: 0000H TMOD: 00H
Acc: 00H TCON: 00H
B: 00H TH0: 00H
PSW: 00H TL0: 00H
SP: 07H TH1: 00H
DPTR: 0000H TL1: 00H
P0~P3: FFH SCON: 00H
IP: ×××00000B SBUF: Uncertain
IE: 0××00000B PCON: 0×××0000B
Any single-chip microcomputer must have a reset process before working. What does reset mean? It is like the preparatory bell we ring before class. When the preparatory bell rings, everyone automatically enters the classroom from the playground and other places. During this period of time, there is no teacher intervention. For the single-chip microcomputer, the program has not yet started to execute, and it is doing preparation work. Obviously, the preparation work does not take too long, and the reset only takes 5ms. How to reset? Just add a high level to the RST pin of the single-chip microcomputer. As mentioned above, the time is not less than 5ms. In order to achieve this requirement, many methods can be used. Here is one for reference, see Figure 1. In fact, we have seen it in the figure of the last experiment.
The working principle of this reset circuit is: when the power is turned on, the two ends of the capacitor are equivalent to a short circuit, so the RST pin is at a high level, and then the power supply charges the capacitor through the resistor, the voltage at the RST end slowly drops to a certain level, that is, a low level, and the microcontroller starts to work normally.
Previous article:Design of breathing detection circuit for multi-life parameter monitor based on 80c196 single chip microcomputer
Next article:Complete Function Analysis of the Special Function Registers of the MCU
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- FPGA Deep Analysis.pdf
- C51 uses macro definition to replace printf function
- Understanding the CAN bus from the bottom up
- Cheats
- [STM32WB55 Review] +USB Dongle Bricked
- STM32F429 USB_OTG_FS (PA11, PA12) read USB disk problem
- PoE and PoE+, an article to understand Power over Ethernet
- How to control trace impedance of PCB for signal integrity?
- Disassembling the USB wireless network card, the circuit scheme is very classic
- Low-cost MCU options