Take the external interrupt level trigger as an example: when the CPU responds to the interrupt and enters the service program, the external low level must be removed before executing the RETI instruction to return to the main program. Otherwise, when the CPU returns to the main program, it will enter the interrupt again due to the external low level signal that is too long. This will not only cause an unnecessary erroneous operation, but also prevent the main program from running normally.
Similarly, other interrupt sources also have similar problems. Therefore, when using interrupts, you must be clear about whether the interrupt request (flag) should be removed and how to remove it before returning to the main program.
How to cancel the interrupt request of MCS-51
Picture 1
Previous article:2×2 determinant keyboard circuit design and keyboard scanning subroutine programming example
Next article:LED display assembly language program including interrupt
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Mentor Online Seminar | Let PCB engineers become "manufacturing experts" and quickly improve the secret of product yield!
- Still need to ask about the timing diagram
- Appreciate the moon, taste mooncakes, and play a quiz with prizes!
- Power usage of smoke detectors
- [AT-START-F425 Review] + Using the serial port receive interrupt and idle interrupt to realize variable length data reception
- EEWORLD University ---- HVI Series: Designing Reliable High-Density Power Solutions with GaN
- IIC Chinese version (free).pdf
- Does anyone have a heating circuit and a 37-degree constant temperature circuit for smart toilets or hand warmers? Share it (or exchange one for another)...
- A brief discussion on the synthesizability of VHDLVerilog and some suggestions for beginners
- 28335 Program automatic upgrade solution