On-Chip Peripheral Components
C513AO
User’s Manual
6-26
05.99
Special Function Register T2MOD (Address C9H)
Reset Value: XXXX XXX0B
6.2.2.2 Auto-Reload (Up or Down Counter)
Timer 2 can be programmed to count up or down when configured in its 16-bit auto-reload mode.
This feature is invoked by a bit named DCEN (Down Counter Enable, SFR T2MOD, 0C9H). When
DCEN is set, Timer 2 can count up or down depending on the value of pin T2EX (P1.1).
Figure 6-16 shows Timer 2 automatically counting up when DCEN = 0. In this mode, there are two
options selectable by bit EXEN2 in SFR T2CON.
Bit
Function
–
Not implemented, reserved for future use.
DCEN
When set, this bit allows Timer 2 to be configured as an up/down counter.
–
–
–
–
C9H
T2MOD
Bit No.
7
6
5
4
3
2
1
0
MSB
LSB
–
–
–
DCEN