Chapter 4. Peripheral Hardware
4.2.4 Timer2
Timer2 operates as a up-counter. The content of T2DR are compared with the
contents of up-counter. If a match is found. Timer2 interrupt (IFT2) is generated
¡ È
¡ È
and the up-counter is cleared to 00H . Therefore, Timer2 executes as a
interval timer. Interrupt period is determined by the count source clock for the
Timer2 and content of T2DR.
When T2ST is set to 1, count value of Timer 2 is cleared and starts counting-
¡ È ¡ È
after set to
cup. For clearing and starting the Timer2. T2ST have to set to
1
¡ È ¡ È
0 . In order to write a value directly into the T2DR, T2ST should be set to
¡ È ¡ È
0 . Count value of Timer2 can be read at any time.
Concurrence
Concurrence
Concurrence
T2 Data
Registers
Value
T2 Value
0
CLEAR
CLEAR
CLEAR
INTERRUPT
INTERRUPT
INTERRUPT
IFT0
Interval period
Fig. 4. 14 Operation of Timer2
4 - 25