-
How is your light-emitting diode connected, if there is a power supply stringed to the light-emitting diode, the low level will be on, if it is the output port of the single-chip microcomputer, it will not be on.
-
int0: external interrupt 0 trigger mode control bit, 1 indicates edge trigger, 0 indicates level trigger;
ex0: the allowed bit of external interrupt 0, 1 indicates that the interrupt application of external interrupt 0 is allowed;
et0: the allowed bit of the interrupt of the timing counter 0, 1 indicates the overflow interrupt of the allowed timing counter 0;
IE0: indicates that there is an interrupt request for external interrupt 0 and 1 indicates that there is an interrupt request.
-
The external interrupt of the microcontroller, whether it is interrupting the 0 channel or other interrupt channels, can be triggered by the external signal of the microcontroller, interrupting other tasks being performed and serving the requirements of the interrupt signal source instruction.
-
Summary. Hello dear! 1. The single-chip microcomputer has two external interrupts, two timer counters, and the two external interrupts are int0 and int1 respectively.
2. The timer counters are T0, T1, and there is a serial interrupt Ti Ri, which adds up to five interrupts.
3. The order in which they are arranged on the hardware is int0, t0, int1, t1, ti ri, and the interrupt sequence number of these 5 interrupt sources is 0, 1, 2, 3, and 4 after interrupt.
4. The timer can choose the working mode, because we use the timer in different ways, some programs will be used for timing, some programs will be used for counting, and the working mode will be set according to the program requirements.
Hope it helps!
How to turn on the external interrupt 2 of the single-chip microcomputer.
Hello dear! 1. The single-chip microcomputer has two external interrupts, two timer counters, the two external interrupts are int0, the timer counters are t0, t1, and a serial port interrupt ti ri, adding up to five interrupts. 3. The order in which they are arranged on the hardware is int0,t0,int1,t1,ti ri,the interrupt sequence number of these 5 interrupt sources is 0,1,2,3 after interrupt, in which the timer can choose the working mode, because we use the timer in different ways, some programs will be used for timing, some programs will be used for counting, and the working mode will be set according to the program requirements.
Hope it helps!
Thank you. If my answer is helpful to you, please give it a thumbs up (comment in the bottom left corner), your efforts are important to me, and your support is also my motivation for progress. Wishing you good health and a happy mood!
void timers() interrupt 0count++;
tr0=1; >>>More
Ignoring the influence of temperature and other factors, the method of measuring voltage by series resistance can be directly adopted. >>>More
Just learn 51 first, the absolute entry-level, you can choose Guo Tianxiang's for the development board, it's been many years, the information is very complete, and then you can look at 32 or something.
Hello: I wrote the program:
#include >>>More
If you really want to learn, you don't need to buy a development board. Find a minimal system board, then learn something, buy components and build small circuits by yourself. Run the electronic market by yourself, build the circuit by yourself, in order to know the problem, in order to learn something, buy a development board, according to the circuit on the manual, and then put the program into it, and then the program basically understands, this is not called learning... >>>More