Generating Analog Output Via PWM
PWM signals can be converted to analog output signals via lowpass filtering. A simple integrator circuit using a 330 KOhm resistor and a 0.05uF capacitor should suffice, though you should check that the bandwidth of this circuit exceeds the bandwidth required for your analog signal. If the output current from the circuit is not sufficient, an operational amplifier may be used.
Additional resources:
- Using PWM Timer_B as a DAC (Texas Instruments application report using the MSP430 microcontroller)
- BAKER’S BEST: Changing the PWM signal to dc