System Integration Module (SIM60)
6-10
MC68360 USER’S MANUAL
6.3.2 Periodic Interrupt Timer (PIT)
The PIT consists of an 8-bit modulus counter that is loaded with the value contained in the
PITR (see
Table 6-4). The modulus counter is clocked by the SPCLK signal derived from
the EXTAL pin (either EXTAL or EXTAL divided by 128 as determined by the MODCK1–
MODCK0 pins). When MODCK1 is low (an external oscillator is used), the 512 (29) pres-
caler is enabled, and the SWP and PTP bits in the PITR are set.
The clock source is divided by 4 before driving the modulus counter (PITCLK). When the
modulus counter value reaches zero, an interrupt is generated. The level of the generated
interrupt is programmed into the PIRQL bits in the periodic interrupt control register (PICR).
During the interrupt acknowledge cycle, the SIM60 places the periodic interrupt vector, pro-
grammed into the PIV bits in the PICR, onto the bus. The value of bits 7–0 in the PITR is
then loaded again into the modulus counter, and the counting process starts over. If a new
value is written to the PITR, this value is loaded into the modulus counter when the current
count is complete.
6.3.2.1 PIT PERIOD CALCULATION. The period of the PIT can be calculated using the fol-
lowing equation:
Solving the equation using a crystal frequency of 32.768-kHz with the prescaler disabled
gives:
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) gives the following values:
PITR count value
PIT period =
SPCLK / prescaler value
22
PITR count value
PIT period =
32768/1
22
PIT period
=
PITR count value
8192
PITR count value
PIT period =
32768/512
22
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.