|
PIC24 Support Libraries
|
Go to the source code of this file.
Demonstrates a PWM DAC - connect an RC filter on the OC1 output and vary the pulse width of the PWM signal, and monitor the DC value on the capacitor. The RC time constant should be at least 10x greater than the PWM period. Examples values used for testing were R=6.8k, C = 1.0u, PWM period= 500 us For better accuracy, use an external crystal and define CLOCK_CONFIG=PRIPLL_8MHzCrystal_40MHzFCY in the MPLAB project. Remove this macro if you wish to use the internal oscillator.
Definition in file pwm_dac.c.
1.8.4