|i'm trying to get two analog outputs with a pic. the simplest way would be |to use the internal pwm feature and run the pic's output pin through an RC |filter (with an opamp to get the current output). does somebody have an |idea how precise that gets, with the output depending on the pic's output |hi/lo values? at what load? i'm targeting the 2% range. When trying to use a PWM to generate an analog voltage, there is a tradeoff between response speed and ripple; using a multi-stage filter on the output will help considerably, but some ripple will be almost inevitable. As for other effects such as loading, the simplest way to deal with them is to minimize them (e.g. use a high-input-impedance voltage follower). Otherwise, if loading is unavoidable but is predictable and resistive, you can simply scale your PWM output to take the loading into account. Generally, other than the inherent ripple, PWM's are quite accurate. The tough part is simply controlling the ripple (and it's not all that hard...)