XC886/888CLM
Timers
User’s Manual
13-24
V1.3, 2010-02
Timers, V 1.0
13.2.10
Register Description
Register T2MOD is used to configure Timer 2 for the various modes of operation.
T2MOD
Timer 2 Mode Register
Reset Value: 00
H
7
6
5
4
3
2
1
0
T2REGS
T2RHEN
EDGESEL
PREN
T2PRE
DCEN
rw
rw
rw
rw
rw
rw
Field
Bits
Type Description
DCEN
0
rw
Up/Down Counter Enable
0
Up/Down Counter function is disabled.
1
Up/Down Counter function is enabled and
controlled by pin T2EX (Up = 1, Down = 0).
T2PRE
[3:1]
rw
Timer 2 Prescaler Bit
Selects the input clock for Timer 2 which is derived
from the peripheral clock.
000
f
T2
=
f
PCLK
001
f
T2
=
f
PCLK
/2
010
f
T2
=
f
PCLK
/4
011
f
T2
=
f
PCLK
/8
100
f
T2
=
f
PCLK
/16
101
f
T2
=
f
PCLK
/32
110
f
T2
=
f
PCLK
/64
111
f
T2
=
f
PCLK
/128
PREN
4
rw
Prescaler Enable
0
Prescaler is disabled and the divider 12
takes effect.
1
Prescaler is enabled (see T2PRE bit) and
the divider 12 is bypassed.
EDGESEL
5
rw
Edge Select in Capture Mode/Reload Mode
0
The falling edge at pin T2EX is selected.
1
The rising edge at pin T2EX is selected.
T2RHEN
6
rw
Timer 2 External Start Enable
0
Timer 2 External Start is disabled.
1
Timer 2 External Start is enabled.
*