
Philips Semiconductors
P89LV51RB2/RC2/RD2
8-bit microcontrollers with 80C51 core
Product data
Rev. 04 — 02 December 2004
31 of 77
9397 750 14342
Koninklijke Philips Electronics N.V. 2004. All rights reserved.
7.4 Timer 2
Timer 2 is a 16-bit Timer/Counter which can operate as either an event timer or an
event counter, as selected by C/T2 in the special function register T2CON. Timer 2
has four operating modes: Capture, Auto-reload (up or down counting), Clock-out,
and Baud Rate Generator which are selected according to
Table 19
using T2CON
(
Table 20
and
Table 21
) and T2MOD (
Table 22
and
Table 23
).
Fig 11. Timer/Counter 0 Mode 3 (two 8-bit counters).
002aaa522
Osc/6
Osc/2
TR1
T0 pin
TR0
TnGate
INT0 Pin
C/T = 0
C/T = 1
TL0
(8-bits)
TF0
control
overflow
interrupt
TH0
(8-bits)
TF1
control
overflow
interrupt
Table 19:
RCLK+TCLK
0
0
0
1
X
Timer 2 operating mode
CP/RL2
0
1
0
X
X
TR2
1
1
1
1
0
T2OE
0
0
1
0
X
Mode
16-BIT auto reload
16-bit capture
Programmable Clock-Out
Baud rate generator
off
Table 20:
Bit addressable; Reset value: 00H
Bit
7
Symbol
TF2
T2CON - Timer/Counter 2 control register (address C8H) bit allocation
6
5
4
3
2
1
0
EXF2
RCLK
TCLK
EXEN2
TR2
C/T2
CP/RL2