Microchip Technology AC164120 User Manual
Signal Analysis PICtail™ Daughter Board User’s Guide
DS51476A-page 26
2004 Microchip Technology Inc.
3.5
LESSON 3 – PULSE WIDTH MODULATED GENERATED SINE WAVE
A sine wave can be generated from a low-pass filtered Pulse Width Modulated (PWM)
signal. The duty cycle of the PWM signal is set to the magnitude of a sine wave at a
prescribed sample rate. The sample rate sets the frequency of the sine wave.
Figure 3-7 is an oscilloscope screen capture of the PWM signal. Persistence has been
set on to capture the varying duty cycle. Figure 3-8 is the resulting sine wave after the
PWM signal in Figure 3-7 has been low-pass filtered.
signal. The duty cycle of the PWM signal is set to the magnitude of a sine wave at a
prescribed sample rate. The sample rate sets the frequency of the sine wave.
Figure 3-7 is an oscilloscope screen capture of the PWM signal. Persistence has been
set on to capture the varying duty cycle. Figure 3-8 is the resulting sine wave after the
PWM signal in Figure 3-7 has been low-pass filtered.
Source code and hex files are available on the CD-ROM.
FIGURE 3-7:
MODULATED PWM SIGNAL (BEFORE FILTERING)
FIGURE 3-8:
SINE WAVE (AFTER PWM FILTERING)