Microcontrollers - 8051 Interrupts and interrupt programing
Microcontrollers - 8051 Interrupts and interrupt programing
External
hardware
interrupts
External input for
counter 0 and
counter 1
(High byte timer 0)
(Enable timer 0)
(Jump if Timer 0 overflow flag bit is not set)
processor vectors to execute interrupt service routine located at
program address 000Bh
(Disable timer 0)
External External
Timer 1 Run interrupt 1
Timer 0 Run interrupt 0
control bit edge type
control bit edge type
control control
Bit Symbol TCON Bit Function
7 TF1 Timer 1 Overflow flag. Set when timer rolls from all 1's to 0. Cleared when processor vectors to execute
interrupt service routine located at program address 001Bh.
6 TR1 Timer 1 run control bit. Set to 1 by program to enable timer to count; cleared to 0 by program to halt timer.
5 TF0 Timer 0 Overflow flag. Set when timer rolls from all 1's to 0. Cleared when processor vectors to execute
interrupt service routine located at program address 000Bh.
4 TR0 Timer 0 run control bit. Set to 1 by program to enable timer to count; cleared to 0 by program to halt timer.
3 IE1 External interrupt 1 Edge flag. Set to 1 when a high-to-low edge signal is received on port 3.3 (INT1). Cleared
when processor vectors to interrupt service routine at program address 0013h. Not related to timer operations.
2 IT1 External interrupt 1 signal type control bit. Set to 1 by program to enable external interrupt 1 to be triggered
by a falling edge signal. Set to 0 by program to enable a low-level signal on external interrupt 1 to generate an
interrupt.
1 IE0 External interrupt 0 Edge flag. Set to 1 when a high-to-low edge signal is received on port 3.2 (INT0). Cleared
when processor vectors to interrupt service routine at program address 0003h. Not related to timer operations.
0 IT0 External interrupt 0 signal type control bit. Set to 1 by program to enable external interrupt 1 to be triggered
by a falling edge signal. Set to 0 by program to enable a low-level signal on external interrupt 0 to generate an
interrupt.