MMC2001
PULSE WIDTH MODULATOR
MOTOROLA
REFERENCE MANUAL
15-1
SECTION 15
PULSE WIDTH MODULATOR
The pulse width modulator (PWM) module contains six identical channels, PWM5 –
PWM0.
15.1 Overview
Each PWM channel consists of a simple free-running counter with two compare reg-
isters. Each compare register performs a particular task when it matches the count
value. The period comparator causes the output pin to be set and the free-running
counter to reset when its value matches the period value. The width comparator
causes the output pin to reset when the counter value matches. With a suitable low-
pass filter, the PWM channel can be used as a digital-to-analog converter.
Figure 15-1 is a block diagram of a single PWM channel.
Figure 15-1 PWM Block Diagram
By feeding a stream of sample values to the PWM into the width register and provid-
ing a low-pass filter on the output, the output pin can provide a digitally-generated
sound source. The reconstruction rate is determined by the selected period. Typically,
for voice quality, the rate is between 6 kHz and 8 kHz. Figure 15-2 relates the pulse
stream to the filtered audio output.
Figure 15-2 PWM Generating Audio
System Clock
Clockgen
(Prescaler)
Width Compare
Counter
Period Compare
Output
Control
Pulse Output
Pulse Stream
Filtered Audio
Freescale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..