(The picture shows the 89C51 pin diagram)
1. There are 5 interrupt sources in the 89C51 microcontroller: two external interrupts, two timer/counter interrupts (overflow), and one serial port interrupt.
2. There are two different types of interrupts in the microcontroller interrupt system: one is called non-maskable interrupt, which cannot be disabled by the user through software; the other is called masked interrupt, which is the type described in this article.
2. Control words
1. External interrupt. Pins 12 and 13 (P3.2, P3.3) of the microcontroller are introduced and named INT0 and INT1. The above TCON register is used to control external interrupts.
IT0: Trigger mode of INT0. 0 means low level trigger; 1 means negative transition trigger.
IE0: This bit is set to 1 when an external interrupt enters. Automatically cleared to 0 after CPU responds.
2. Internal interrupt. TCON register, described in Timer.
3. The serial port is interrupted.
4. Interrupt enable register
Interrupt enable register | |||||||
EA | X | ET2 | ES | ET1 | EX1 | ET0 | EX0 |
EA: master switch
ET2: Timer/counter 2 control bit, supported by 89C52.
Others: timer/counter 0, 1 and external interrupt 0, 1 control bits.
5. Interrupt entry address
² External interrupt 0 (INT0): 0003H
² Timer 0 (T0): 000BH
² External interrupt 1 (INT1): 0013H
² Timer 1 (T1): 001BH
² Serial port interrupt: 0023H
Previous article:Design and production of clock circuit based on 89C51
Next article:Design of stepper motor control system using 89C51 microcontroller
Recommended ReadingLatest update time:2024-11-15 08:13
- 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)
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
- Principles and Applications of Single Chip Microcomputers and C51 Programming (3rd Edition) (Xie Weicheng, Yang Jiaguo)
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Why use WDM-PON in 5G fronthaul
- 【Iprober 520 Current Probe】Evaluation Report (II) Basic Performance Test
- MicroPython Hands-on (28) - Yeelight for the Internet of Things
- Basic operations and precautions for exporting Gerber files from PCB design (Part 1)
- Allegro cannot be installed due to VC2005. Is there any way to fix this?
- Has anyone used Sensortile Box? Please help~
- RFID semantic events in supply chain environment
- 【GD32307E-START】Light up an LED
- The MP3 purchased with E coins has arrived. It’s never too late to learn English!
- MSP430F5529 library functions