Using PWM to Generate Analog Output [pdf]
ww1.microchip.com