English
Language : 

XC164-16 Datasheet, PDF (111/417 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC164-16 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
Timer Mode
In Timer Mode (TxM = 0), the input clock for a CAPCOM timer is derived from fCC,
divided by a programmable prescaler. Each timer has its own individual prescaler,
controlled through the individual bitfields TxI in the timer control registers T01CON and
T78CON.
The input frequency fTx for a timer Tx and its resolution rTx are determined by the
following formulas:
Staggered Mode:
fTx[MHz]
=
f---C---C---[--M------H----z----]
2(<Txl> + 3)
Non-Staggered Mode:
rTx[µs]
=
--2----(-<---T--x--l->---+----3--)-
fCC[MHz]
(17.1)
fTx[MHz]
=
f---C---C---[--M------H----z----]
2<Txl>
rTx[µs]
=
-------2---<---T--x--l->-------
fCC[MHz]
(17.2)
When a timer overflows from FFFFH to 0000H, it is reloaded with the value stored in its
respective reload register TxREL. The reload value determines the period PTx between
two consecutive overflows of Tx as follows:
Staggered Mode:
PTx[µs]
=
-(--2---1---6---–-----<---T----x---R----E----L---->----)---×-----2----(-<---T--x--l->---+----3--)
fCC[MHz]
Non-Staggered Mode:
(17.3)
PTx[µs]
=
-(--2---1---6---–-----<---T----x---R----E----L---->----)---×-----2----<--T--x--l->-
fCC[MHz]
(17.4)
After a timer has been started by setting its run flag (TxR), the first increment will occur
within the time interval which is defined by the selected timer resolution. All further
increments occur exactly after the time defined by the timer resolution.
Examples for timer input frequencies, resolution and periods, which result from the
selected prescaler option in TxI when using a 40 MHz clock, are listed in Table 17-1
below. The numbers for the timer periods are based on a reload value of 0000H. Note
that some numbers may be rounded.
User’s Manual
CC12_X41, V2.1
17-6
V2.1, 2004-03