PIC32MX: Sinusoidal Analog Output

From Mech
Revision as of 09:47, 20 April 2010 by Andrew Long (talk | contribs)
Jump to navigationJump to search

Overview:

How do we obtain analog output? ie PWM (brief description)

How do we get sinusoidal output? ie divide up sinusoid into N points, scale duty cycle accordingly

General discussion about how cutoff frequency, number of points period (N) and the RC time constant matter.

State that the examples here have PWM at 20kHz.

Cutoff Frequency

How to choose cut-off frequency -- what is the equation?

Show picture if you choose your frequency to high and if you choose your frequency to low.

Say something about how the amplitude decreases with high frequency

Number of Points Per Period

Show Pictures of number of points to small - discuss that you see the capacitor charging

Show picture of good number of points

RC Time Constant

Explain that a large RC time constant smooths the plot but introduces a phase lag.

Show the pictures you provided in the presentation.

Sample Code

Include your sample code (this may need cleaned up a bit).

To make a box around the code, put a 'space' in front of each line.