Typewriter User Manual

4- 8 MC68340 USER’S MANUAL MOTOROLA
4.2.2.6.1 Periodic Timer Period Calculation. The period of the periodic timer can be
calculated using the following equation:
PITR count value
periodic interrupt timer period = EXTAL frequency/prescaler value
2
2
Solving the equation using a crystal frequency of 32.768-kHz with the prescaler disabled
gives:
PITR count value
periodic interrupt timer period = 32768/1
2
2
periodic interrupt timer period = PITR count value
8192
This gives a range from 122 µs, with a PITR value of $01 (00000001 binary), to 31.128
ms, with a PITR value of $FF (11111111 binary).
Solving the equation with the prescaler enabled (PTP=1 in the PITR) gives the following
values:
PITR count value
periodic interrupt timer period = 32768/512
2
2
periodic interrupt timer period = PITR count value
16
This gives a range from 62.5 ms, with a PITR value of $01, to 15.94 s, with a PITR value
of $FF.
For fast calculation of periodic timer period using a 32.768-kHz crystal, the following
equations can be used:
With prescaler disabled:
programmable interrupt timer period = PITR (122 µs)
With prescaler enabled:
programmable interrupt timer period = PITR (62.5 ms)
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...