
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The General Purpose Timer Units
User’s Manual
14-40
V2.2, 2004-01
GPT_X1, V2.0
Timer T5 Run Control
The auxiliary timer T5 can be started or stopped by software in two different ways:
•
Through the associated timer run bit (T5R). In this case it is required that the
respective control bit T5RC = 0.
•
Through the core timer’s run bit (T6R). In this case the respective remote control bit
must be set (T5RC = 1).
The selected run bit is relevant in all operating modes of T5. Setting the bit will start the
timer, clearing the bit stops the timer.
T5CC
11
rw
Timer T5 Capture Correction
0
T5 is just captured without any correction
1
T5 is decremented by 1 before being captured
CT3
10
rw
Timer T3 Capture Trigger Enable
0
Capture trigger from input line CAPIN
1
Capture trigger from T3 input lines T3IN and/or
T3EUD
T5RC
9
rw
Timer T5 Remote Control
0
Timer T5 is controlled by its own run bit T5R
1
Timer T5 is controlled by the run bit T6R of
core timer 6, not by bit T5R
T5UD
7
rw
Timer T5 Up/Down Control
0
Timer T5 counts up
1
Timer T5 counts down
T5R
6
rw
Timer T5 Run Bit
0
Timer T5 stops
1
Timer T5 runs
Note: This bit only controls timer T5 if bit T5RC = 0.
T5M
[5:3]
rw
Timer T5 Mode Control (Basic Operating Mode)
000
Timer Mode
001
Counter Mode
010
Gated Timer Mode with gate active low
011
Gated Timer Mode with gate active high
1XX Reserved. Do not use this combination
T5I
[2:0]
rw
Timer T5 Input Parameter Selection
Depends on the operating mode, see respective
sections for encoding:
for Timer Mode and Gated Timer Mode
for Counter Mode
Field
Bits
Typ
Description