Hardware Connection:
Code:
#include #include #define uchar unsigned char #define uint unsigned int sbit LED = P1^0; void EX_INT0() interrupt 0 { fly bi = P2 & 0x07; P0 = _cror_(0x7f,bi); } void main() { uint i; IE = 0x81; IT0 = 0; while(1) { LED = !LED; for(i=0;i<30000;i++); if(INT0 == 1) P0 = 0xff; } }
Previous article:Introduction to single chip microcomputer - flashing LED light
Next article:74HC595 serial-in parallel-out chip application
Recommended ReadingLatest update time:2024-11-15 07:26
- Popular Resources
- Popular amplifiers
- Automatic identification of garbage trucks
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- 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
- What is the difference between TI's DSP2812 and 28335?
- Ended -- Microchip Live Broadcast [Implementing MultiZone Security in RISC-V Applications]
- Detailed explanation of EMC radiated emission test and conducted emission test
- 1
- RC Filtering
- Research and experience on vehicle control strategy for CAN bus application in pure electric vehicles
- Who broke your oscilloscope?
- EEWORLD University Hall----Live Replay: Infineon 1027 Infineon MERUS? Multi-level technology and its advantages of Class D audio amplifier
- After CC2541 is in master mode and searches for slaves to connect, the host can receive the data sent by the slave, but the slave cannot receive the data sent by the master?
- Review summary: Beetle ESP32-C3 free review