MC68HC916X1
MOTOROLA
MC68HC916X1TS/D
87
6 General-Purpose Timer Module
The GPT is a simple, yet flexible 11-channel timer used in systems where a moderate degree of
external visibility and control is required. The GPT consists of a capture/compare unit, a pulse ac-
cumulator, and two pulse-width modulators. A bus interface unit connects the GPT to the intermod-
ule bus.
Figure 14 GPT Block Diagram
6.1 Overview
The capture/compare unit features three input capture channels, four output compare channels and
one selectable input capture/output compare channel. These channels share a 16-bit free-running
counter (TCNT), which derives its clock from a nine-stage prescaler or from the external clock input
signal (PCLK).
Pulse accumulator channel logic includes an 8-bit counter; the pulse accumulator can operate in
either event counting mode or gated time accumulation mode.
Pulse-width modulator outputs are periodic waveforms whose duty cycles can be independently se-
lected and modified by user software. The PWM circuits share a 16-bit free-running counter that
can be clocked by the same nine-stage prescaler used by the capture/compare unit or by the PCLK
input.
All GPT pins can also be used for general-purpose input/output. The input capture and output com-
pare pins form a bidirectional 8-bit parallel port (PORTGP). PWM pins are outputs only. PAI and
PCLK pins are inputs only.
GPT input capture/output compare pins are bidirectional and can be used to form an 8-bit parallel
port. The pulse-width modulator outputs can be used as general-purpose outputs. The PAI and
PCLK inputs can be used as general-purpose inputs.
GPT BLOCK
PULSE ACCUMULATOR
PWM UNIT
BUS INTERFACE
IMB
CAPTURE/COMPARE UNIT
PRESCALER
IC1/PGP0
IC2/PGP1
IC3/PGP2
PCLK
PWMB
PWMA
PAI
IC4/OC5/OC1/PGP7
OC4/OC1/PGP6
OC3/OC1/PGP5
OC2/OC1/PGP4
OC1/PGP3
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
..
.