Quote Originally Posted by skimask View Post
Another way, use the PWM module (or software PWM) across an R/C network, vary the duty cycle of the PWM output to change the average voltage across the cap. Probably want to follow the R/C with an Op-Amp so any loads won't change the voltage across the cap much.
Can you post samo exaple, i dont understand good?