TCON Special Function register.
If a counter is programmed to be a timer, it will count the internal clock frequency of the 8051 oscillator 12d. As an example, if the crystal frequency 6 MHz, then the timer clock will have a frequency of 500kHz.
The timers may operate in any one of four modes that are determined by the mode bits.
In that the timer control TCON it is a special function register.
TCON:

Pin Description of TCON:
The timers may operate in any one of four modes that are determined by the mode bits.
In that the timer control TCON it is a special function register.
TCON:

Pin Description of TCON:
Bit | Symbol | TCON Bit Function |
7 | TF1l | 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 | TR1l | Timer 1 run control bit. Set to 1 by a program to enable the timer to count; cleared to 0 by the program to halt timer. |
5 | TF0 l | 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 | TR0l | Timer 0 run control bit. Set to 1 by a program to enable the timer to count; cleared to 0 by the program to halt timer. |
3 | IE1 l | External interrupt 1 Edge flag. Set to 1 when a high-to-low edge signal is received on port 3.3 Cleared when processor vectors to interrupt service routine at program address 0013h. Not related to timer operations. |
2 | IT1 l | External interrupt 1 signal type control bit. Set to 1 by the program to enable external interrupt 1 to be triggered by a falling edge signal. Set to 0 by a program to enable a low-level signal on external interrupt 1 to generate an interrupt. |
1 | IE0 l | External interrupt 0 Edge flag. Set to 1 when a high-to-low edge signal is received on port 3.2 Cleared when processor vectors to interrupt service routine at program address 0003h. Not related to timer operations. |
0 | IT0 l | 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. |
Comments
Post a Comment