MC68336/376
TIME PROCESSOR UNIT
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
11-10
specified input signal. The ratio of the input and output frequency is programmable.
One or more output signals with different frequencies, yet proportional and synchro-
nized to a single input signal, can be generated on separate channels.
Refer to TPU programming note Period/Pulse-Width Accumulator (PPWA) TPU
Function (TPUPN11/D) for more information.
11.4.11 Quadrature Decode (QDEC)
The quadrature decode function uses two channels to decode a pair of out-of-phase
signals in order to present the CPU32 with directional information and a position value.
It is particularly suitable for use with slotted encoders employed in motor control. The
function derives full resolution from the encoder signals and provides a 16-bit position
counter with rollover/under indication via an interrupt.
The counter in parameter RAM is updated when a valid transition is detected on either
one of the two inputs. The counter is incremented or decremented depending on the
lead/lag relationship of the two signals at the time of servicing the transition. The user
can read or write the counter at any time. The counter is free running, overflowing to
$0000 or underflowing to $FFFF depending on direction.
The QDEC function also provides a time stamp referenced to TCR1 for every valid sig-
nal edge and the ability for the host CPU to obtain the latest TCR1 value. This feature
allows position interpolation by the host CPU between counts at very slow count rates.
Refer to TPU programming note Quadrature Decode (QDEC) TPU Function
(TPUPN20/D) for more information.
11.5 G Mask Set Time Functions
The following paragraphs describe factory-programmed time functions implemented in
the motion control 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.
11.5.1 Table Stepper Motor (TSM)
The TSM function provides for acceleration and deceleration control of a stepper
motor with a programmable number of step rates up to 58. TSM uses a table in param-
eter RAM, rather than an algorithm, to define the stepper motor acceleration profile,
allowing the user to fully define the profile. In addition, a slew rate parameter allows
fine control of the terminal running speed of the motor independent of the acceleration
table. The CPU need only write a desired position, and the TPU accelerates, slews,
and decelerates the motor to the required position. Full and half step support is pro-
vided for two-phase motors. In addition, a slew rate parameter allows fine control of
the terminal running speed of the motor independent of the acceleration table.
Refer to TPU programming note Table Stepper Motor (TSM) TPU Function
(TPUPN04/D) for more information.