Pulse-Width Modulator 1 and 2 15-1
Chapter 15Pulse-Width Modulator 1 and 2
This chapter describes the DragonBall VZ’s two pulse-width modulators (PW Ms). Each of the puls e-width
modulators has three modes of operation—playback, tone, and digital-to-analog (D/A) conversion. Using
these modes, the PWM can be used to play back high-quality digital sounds, produce simple tones, or
convert digital data into analog waveforms.

15.1 Introduction to PWM Operation

PWM 1 uses 8-bit resolution, which is compatible with the MC68EZ328 (DragonBall EZ). PWM2 uses
16-bit resolution, which is compatible with the MC68328 (the original DragonBall). The output PWMO1
is generated by logically combining the output of both PWMs. The output is available at the PWMO1
external pin. The PWMO2 output is generated solely by PWM 2 and is brought to the PWMO2 external
pin. See Figure15-1.
Figure 15-1. PWM 1 and PWM 2 System Configuration Diagram
The operation of the logical block combining the output of PWM 1 and PWM 2 is controlled by
programming the P[1:0] bits in the peripheral control register. See Section 5.2.2, “Peripheral Control
Register,” on page5-4 for details about the settings of these bits.
PWM 1 (8-bit)
PWM 2 (16-bit)
Data
Logical
Operation PWMO1
PWMO2