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:

BitSymbolTCON Bit Function
7TF1lTimer 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.
6TR1lTimer 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.
5TF0 lTimer 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.
4TR0lTimer 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.
3IE1 lExternal 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.
2IT1 lExternal 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.
1IE0 lExternal 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.
0IT0 lExternal 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

Popular posts from this blog

General puprose registers in 8051.

TMOD Special Function Register.