Motorola MPC533 Reference Manual page 798

Table of Contents

Advertisement

MIOS14 Function Examples
MIOS14 Modulus Counter Submodule
From
Prescaler
or Pin
Clock
16-bit Up-Counter
Select
Figure 17-44. MIOS14 Example: Double Edge Output Compare
17.13.4
MIOS14 Output Pulse Width Modulation with MDASM
Output waveforms can be generated with any duty cycle without software involvement.
The software sets up a MDASM with the compare times for the rising and falling edges and
they are automatically repeated. The software does not need to respond to interrupts to
generate continuous pulses. The frequency may be selected as the frequency of a
free-running counter time-base, times a binary multiplier selected in the MDASM. Multiple
PWM outputs can be created from multiple MDASMs and share one counter submodule,
provided that the frequencies of all of the output signals are a binary multiple of the
time-base and that the counter submodule is operating in a free-running mode. Each
MDASM has a software selectable "don't care" on high-order bits of the time-base
comparison so that the frequency of one output can be a binary multiple of another signal.
Masking the time-base serves to multiply the frequency of the time-base by a binary
number to form the frequency of the output waveform. The duty cycle can vary from one
cycle to 64-Kbyte cycles. The frequency can range from 0.48 Hz to 156 KHz, though the
resolution decreases at the higher frequencies to as low as seven bits. The generation of
output square wave signals is of course the special case where the high and low times are
equal.
When an MMCSM is used to drive the time-base, the modulus value is the period of the
output PWM signal. Figure 17-45 shows such an example. The polarity of the leading edge
of an output waveform is programmable for a rising or a falling edge. The software selects
the period of the output signal by programming the MMCSM with a modulus value. The
17-74
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
MIOS14 Double Action Submodule
in OCB mode (MOD3 - MOD0 = 0b0100)
Two
16-bit
16-bit Register A
Counter
Buses
16-bit Compare A
Bus
Select
16-bit Compare B
16-bit Register B2
Submodule Bus
MPC533 Reference Manual
Output
Signal
Output
Flip-Flop
Output
Compare
Interrupt
on
Trailing
Edge
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpc534

Table of Contents