By manually inputting single pulses to the /INT0 of the 8051 microcontroller one by one, an interrupt is requested to the microcontroller.
Each time the microcontroller interrupts, it outputs 55H, AAH, 55H, AAH, etc. to port P1 in sequence.
;==============================================
Best answer: The following program, after debugging, fully meets the requirements of the question.
ORG 0000H
LJMP START
XRL P1, #255 JNB
P3.2, $
RETI
START: SETB
IT0 SETB
EX0
SETB EA
MOV P1, #55H SJMP
$
END
;
= ...
Only by writing programs in assembly language can such a refined level be achieved.
Some people write programs in C and find that after compiling, the storage space of the microcontroller chip is not enough.
It is recommended that you should master assembly language in order to rise to a higher level.
;==============================================
Previous article:51 MCU assembly language - delay time of delay program
Next article:The shortest and most efficient pulse output program
- Popular Resources
- Popular amplifiers
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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- [Project Source Code] FPGA-based 10-channel logic analyzer - 74 pages of excellent project tutorials
- Transformer coupled push-pull power amplifier circuit
- UWB Indoor Positioning Technology Solution
- iTOP-3399 development board Linux system compilation and burning - obtain/install/compile Linux source code
- Questions about writing data from DSP to DATARAM in PRU1
- Please recommend a buck-boost chip
- The weekly evaluation information will be here soon~ Have a happy holiday and happy work~~
- Crazy Shell AI open source drone PID basics
- What are the main differences between DSP's C language and host's C language?
- renesas Renesas R-CAR Series Guide