English
Language : 

W78ERD2 Datasheet, PDF (26/72 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2
Continued
BIT NAME
3 EXEN2
2
TR2
1
C/T2
0 CP/RL2
FUNCTION
Timer 2 External Enable: This bit enables the capture/reload function on the
T2EX pin if Timer 2 is not generating baud clocks for the serial port. If this bit is
0, then the T2EX pin will be ignored, else a negative transition detected on the
T2EX pin will result in capture or reload.
Timer 2 Run Control: This bit enables/disables the operation of timer 2.halting
this will preserve the current count in TH2, TL2.
Counter/Timer select: This bit determines whether timer 2 will function as a timer
or a counter. Independent of this bit, the timer will run at 2 clocks per tick when
used in baud rate generator mode. If it is set to 0, then timer 2 operates as a
timer at a speed depending on T2M bit (CKCON.5), else, it will count negative
edges on T2 pin.
Capture/Reload Select: This bit determines whether the capture or reload
function will be used for timer 2. If either RCLK or TCLK is set, this bit will not
function and the timer will function in an auto-reload mode following each
overflow. If the bit is 0 then auto-reload will occur when timer 2 overflows or a
falling edge is detected on T2EX if EXEN2 = 1. If this bit is 1, then timer 2
captures will occur when a falling edge is detected on T2EX if EXEN2 = 1.
Timer 2 Mode
Bit:
7
6
5
4
3
-
-
-
-
-
Mnemonic: T2MOD Address: C9h
2
1
0
-
T2OE DCEN
BIT NAME
FUNCTION
7~2
-
Reserve
1
T2OE Timer 2 Output Enable. This bit enables/disables the Timer 2 clock out function.
0
DCEN Down Count Enable: This bit, in conjunction with the T2EX pin, controls the
direction that timer 2 counts in 16-bit auto-reload mode.
Timer 2 Capture Low
Bit:
7
6
5
4
3
2
1
0
RCAP2L.7 RCAP2L.6 RCAP2L.5 RCAP2L.4 RCAP2L.3 RCAP2L.2 RCAP2L.1 RCAP2L.0
Mnemonic: RCAP2L Address: CAh
RCAP2L Timer 2 Capture LSB: This register is used to capture the TL2 value when a timer 2 is
configured in capture mode. RCAP2L is also used as the LSB of a 16-bit reload value when timer 2 is
configured in auto-reload mode.
- 26 -