Andrew Warren wrote: > > Jim Dolson wrote: > > > I just ordered a DS1669 (PIC controllable pot) to adjust the > > contrast on an LCD panel under PIC control. I'm always interested > > in reducing the parts count. How would I adjust the contrast > > using PWM? > > It's pretty simple, Jim: > > 1. Generate a PWM signal. If your PIC has a hardware PWM > generator, great... If not, do it in software. Make the PWM > frequency as high as possible. 1a. And if you can't make the PWM frequency very high, then consider bursts of pulse width modulated pulses, where a "burst" may only be a single PWM cycle. The trick is that while your not PWMing (is that one or two ems?) the PWM output is reprogrammed as an input and consequently a high impedance (i.e. no load on your RC filter). Scott