
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The General Purpose Timer Units
User’s Manual
14-17
V2.2, 2004-01
GPT_X1, V2.0
Timer T2/T4 Run Control
Each of the auxiliary timers T2 and T4 can be started or stopped by software in two
different ways:
•
Through the associated timer run bit (T2R or T4R). In this case it is required that the
respective control bit TxRC = 0.
•
Through the core timer’s run bit (T3R). In this case the respective remote control bit
must be set (TxRC = 1).
The selected run bit is relevant in all operating modes of T2/T4. Setting the bit will start
the timer, clearing the bit stops the timer.
In gated timer mode, the timer will only run if the selected run bit is set and the gate is
active (high or low, as programmed).
Note: If remote control is selected T3R will start/stop timer T3 and the selected auxiliary
timer(s) synchronously.
Count Direction Control
The count direction of the GPT1 timers (core timer and auxiliary timers) is controlled in
the same way, either by software or by the external input pin TxEUD. Please refer to the
description in
Note: When pin TxEUD is used as external count direction control input, it must be
configured as input (its corresponding direction control bit must be cleared).
TxI
[2:0]
rw
Timer Tx Input Parameter Selection
Depends on the operating mode, see respective
sections for encoding:
for Timer Mode and Gated Timer Mode
for Incremental Interface Mode
1) See
for encoding of bits TxUD and TxEUD.
Field
Bits
Typ
Description