
The general purpose timer units
UM0404
DocID13284 Rev 2
Timer 6 output toggle latch
An overflow or underflow of timer T6 will clock the toggle bit T6OTL in control register
T6CON. T6OTL can also be set or reset by software. Bit T6OE (Alternate Output Function
Enable) in register T6CON enables the state of T6OTL to be an alternate function of the
external output pin T6OUT/P3.1. For that purpose, a ‘1’ must be written into port data latch
P3.1 and pin T6OUT/P3.1 must be configured as output by setting direction control bit
DP3.1 to ‘1’. If T6OE = ‘1’, pin T6OUT then outputs the state of T6OTL. If T6OE = ‘0’, pin
T6OUT can be used as general purpose I/O pin.
In addition, T6OTL can be used in conjunction with the timer over/underflows as an input for
the counter function of the auxiliary timer T5. For this purpose, the state of T6OTL does not
have to be available at pin T6OUT, because an internal connection is provided for this
option.
An overflow or underflow of timer T6 can also be used to clock the timers in the CAPCOM
units. For this purpose, there is a direct internal connection between timer T6 and the
CAPCOM timers.
Timer 6 in timer mode
Timer mode for the core timer T6 is selected by setting bit-field T6M in register T6CON to
‘000b’. In this mode, T6 is clocked with the internal system clock divided by a programmable
pre-scaler, which is selected by bit-field T6I. The input frequency f
T6
for timer T6 and its
resolution r
T6
are scaled linearly with lower clock frequencies f
CPU
, as can be seen from the
following formula:
Figure 91. Block diagram of core timer T6 in timer mode
The timer resolutions which result from the selected pre-scaler option are listed in the
. This table also applies to the Gated Timer Mode of T6 and to the auxiliary timer T5
in timer and gated timer mode.
f
T6
=
f
CPU
4 x 2
(T6I)
r
T6
[
μ
s] =
f
CPU
[MHz]
4 x 2
(T6I)
T6R
MUX
T6UDE
Core Timer T6
T6IR
Interrupt
Request
T6OTL
T6OE
T6OUT
Up/Down
XOR
1
0
T6UD
T6EUD
T6l
Edge
Select
T6IN
P5.10
P5.12
P3.1