User’s Manual
C166S V1 SubSystem
General Purpose Timer Unit
User’s Manual
12-30
V 1.6, 2001-08
In Gated Timer Mode, the timer will run only if T6R is set and the gate is active (high or
low, as programmed).
Note: When bit T5RC is set, bit T6R will also control (start and stop) auxiliary Timer T5.
Count Direction Control
The count direction of the core timer can be controlled either by software or by the
External Up/Down control input line (T6EUD). These options are selected by bits T6UD
and T6UDE in control register T6CON. When the up/down control is done by software
(bit T6UDE is cleared), the count direction can be altered by setting or clearing bit T6UD.
When T6UDE is set, line T6EUD is selected to be the controlling source of the count
direction. However, bit T6UD can still be used to reverse the actual count direction, as
shown in the table below. If T6UD is cleared and line T6EUD shows a low level, the timer
is counting up. With a high level at T6EUD the timer is counting down. If T6UD is set, a
high level at line T6EUD specifies counting up, and a low level specifies counting down.
The count direction can be changed whether the timer is running or not.
Note: The direction control works the same for core Timer T6 and for auxiliary Timer T5.
Timer 6 Overflow/Underflow Monitoring
An overflow or underflow of Timer T6 will toggle T6OTL in control register T6CON.
T6OTL can also be set or reset by software. Bit T6OE in register T6CON enables the
state of T6OTL to be monitored via the external output line T6OUT. An associated port
pin must be configured as output.
Additionally, T6OTL can be used in conjunction with the timer over/underflow as an input
for the counter function of auxiliary Timer T5. For this purpose, the state of T6OTL does
not have to be available at line T6OUT, because an internal connection is provided for
this option.
An overflow or underflow of Timer T6 can also be used to clock other timers. For this
purpose, there is the special output line T6OFL.
Table 12-10 Core Timer T6 Count Direction Control
Line T6EUD
Bit T6UDE
Bit T6UD
Count Direction
X
0
0
Count Up
X
0
1
Count Down
0
1
0
Count Up
1
1
0
Count Down
0
1
1
Count Down
1
1
1
Count Up
Содержание C166S V1 SubSystem
Страница 10: ...User s Manual C166S V1 SubSystem User s Manual I 6 V 1 6 2001 08...
Страница 16: ...User s Manual C166S V1 SubSystem Introduction User s Manual 1 6 V 1 6 2001 08...
Страница 126: ...User s Manual C166S V1 SubSystem Central Processing Unit User s Manual 3 96 V 1 6 2001 08...
Страница 178: ...User s Manual C166S V1 SubSystem Memory Organization User s Manual 4 52 V 1 6 2001 08...
Страница 206: ...User s Manual C166S V1 SubSystem Instruction Set User s Manual 5 28 V 1 6 2001 08...
Страница 306: ...User s Manual C166S V1 SubSystem Detailed Instruction Set User s Manual 6 100 V 1 6 2001 08...
Страница 362: ...User s Manual C166S V1 SubSystem The External Bus Interface User s Manual 8 40 V 1 6 2001 08...
Страница 452: ...User s Manual C166S V1 SubSystem General Purpose Timer Unit User s Manual 12 44 V 1 6 2001 08...
Страница 454: ...User s Manual C166S V1 SubSystem Instruction Index User s Manual 13 2 V 1 6 2001 08...
Страница 459: ......