The program C language source code is as follows:
/*
INT1 interrupt 5-bit count
*/
#include typedef unsigned char uint8; typedef unsigned int uint16; sbit LED = P0^0; uint16 T_Count = 0; void main() { TMOD = 0x01; TH0 = 0xFC; TL0 = 0x67; IE = 0x82; TR0 = 1; while(1); } void LED_Flash() interrupt 1 { TMOD = 0x01; TH0 = 0xFC; if(++T_Count == 100) { LED = ~LED; //!LED T_Count = 0; } }
Previous article:INT1 interrupt five-bit counter PROTEUS and 51 microcontroller tutorial
Next article:4 Use the shift function to light up the running lights
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Vicor high-performance power modules enable the development of low-altitude avionics and EVTOL
- Chuangshi Technology's first appearance at electronica 2024: accelerating the overseas expansion of domestic distributors
- Chuangshi Technology's first appearance at electronica 2024: accelerating the overseas expansion of domestic distributors
- "Cross-chip" quantum entanglement helps build more powerful quantum computing capabilities
- Ultrasound patch can continuously and noninvasively monitor blood pressure
- Ultrasound patch can continuously and noninvasively monitor blood pressure
- Europe's three largest chip giants re-examine their supply chains
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- China Digital Interface Industry Alliance to be established
- [#Ren Zhengfei responds to hot topics#: We cannot narrowly think that loving Huawei means loving Huawei phones]
- How to burn flash of DLPC4422? Does source code engineering require TI authorization?
- NRF52832 Minimal System Debug
- PCB layout guidelines to effectively improve electromagnetic compatibility
- The component industry faces the challenge of transformation
- [Anxinke NB-IoT Development Board EC-01F-Kit] V. Comprehensive Test
- Interface Design between 16-bit Σ-Δ A/D Converter AD7705 and Microcontroller
- Application of UPS in communication system
- If anyone has a Concise Mechanical Manual, please send me a copy. I'd be very grateful.