English
Language : 

MC68331 Datasheet, PDF (70/84 Pages) Motorola, Inc – User’s Manual
Freescale Semiconductor, Inc.
6 General-Purpose Timer Module
The 11-channel general-purpose timer (GPT) is used in systems where a moderate level of CPU control
is required. The GPT consists of a capture/compare unit, a pulse accumulator, and two pulse-width
modulators. A bus interface unit connects the GPT to the intermodule bus.
IC1/PGP0
IC2/PGP1
IC3/PGP2
CAPTURE/COMPARE UNIT
PULSE ACCUMULATOR
PRESCALER
PWM UNIT
BUS INTERFACE
OC1/PGP3
OC2/OC1/PGP4
OC3/OC1/PGP5
OC4/OC1/PGP6
IC4/OC5/OC1/PGP7
PAI
PCLK
PWMA
PWMB
IMB
Figure 15 GPT Block Diagram
GPT BLOCK
6.1 Overview
The capture/compare unit features three input capture channels, four output compare channels, and
one channel that can be selected as an input capture or 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 ex-
ternal 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 select-
ed 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 compare
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.
The GPT control register address map is shown below. The “Access” column in the GPT address map
indicates which registers are accessible only at the supervisor privilege level and which can be assigned
to either the supervisor or user privilege level, according to the value of the SUPV bit in the GPTMCR.
70
For More Information On This Product,
MC68331TS/D
Go to: www.freescale.com