TIME PROCESSOR UNIT
MC68332
7-6
USER’S MANUAL
7.4 Standard and Enhanced Standard Time Functions
The following paragraphs describe factory-programmed time functions implemented
in standard and enhanced standard TPU microcode ROM. A complete description of
the functions is beyond the scope of this manual. Refer to the
TPU Reference Manual
(TPURM/AD) for additional information.
7.4.1 Discrete Input/Output (DIO)
When a pin is used as a discrete input, a parameter indicates the current input level
and the previous 15 levels of a pin. Bit 15, the most significant bit of the parameter,
indicates the most recent state. Bit 14 indicates the next most recent state, and so on.
The programmer can choose one of the three following conditions to update the pa-
rameter: 1) when a transition occurs, 2) when the CPU makes a request, or 3) when a
rate specified in another parameter is matched. When a pin is used as a discrete out-
put, it is set high or low only upon request by the CPU.
7.4.2 Input Capture/Input Transition Counter (ITC)
Any channel of the TPU can capture the value of a specified TCR upon the occurrence
of each transition or specified number of transitions, and then generate an interrupt re-
quest to notify the CPU. A channel can perform input captures continually, or a chan-
nel can detect a single transition or specified number of transitions, then cease
channel activity until reinitialization. After each transition or specified number of tran-
sitions, the channel can generate a link to a sequential block of up to eight channels.
The user specifies a starting channel of the block and the number of channels within
the block. The generation of links depends on the mode of operation. In addition, after
each transition or specified number of transitions, one byte of the parameter RAM (at
an address specified by channel parameter) can be incremented and used as a flag
to notify another channel of a transition.
7.4.3 Output Compare (OC)
The output compare function generates a rising edge, falling edge, or a toggle of the
previous edge in one of three ways:
1. Immediately upon CPU initiation, thereby generating a pulse with a length equal
to a programmable delay time.
2. At a programmable delay time from a user-specified time.
3. Continuously. Upon receiving a link from a channel, OC references, without
CPU interaction, a specifiable period and calculates an offset:
where Ratio is a parameter supplied by the user.
This algorithm generates a 50% duty-cycle continuous square wave with each high/
low time equal to the calculated OFFSET. Due to offset calculation, there is an initial
link time before continuous pulse generation begins.
Offset
Period Ratio
×
=
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
.
..