> > >I am trying to design a PIC-programmable pwer supply. I'd like to select by > >software any voltage between 1.5V and 15V. PCB space is VERY small. > > Hi Andres, what is the resolution required? 0.05V per step? 0.50V? > > > >So I decided to use a Dallas DS1804 8-pin programmable potentiometer managed > >by a PIC 12C509 or similar to drive a LM317L (100mA is enough). The problem > >here is that the DS 1804 can't stand more than 5V on ANY pin, including the > >potentiometer pins. So, I can't use it to directly drive the LM317L.... It > >follows that I have to use a transistor or FET to convert levels. While I > >have no problems with digital circuits, I have little experience with Analog > >ones, so I don't exactly how to do this. Circuit deleted for brevity. One last thing. I use 7406/7407 Open collector hex inverters/buffers for selecting the resistor for the LM317 circuit. Compact and can stand input voltages up to 30V. Just a touch easier to deal with than raw transistors. Be aware that a LM317 cannot do 0V because the output is always 1.25V above the input. The first time I saw the circuit, in Steve Ciarcia's Intelligent Serial EPROM programmer in Byte Magazine, he used a transistor with a negative bias to pull the line to 0V. I've found for PICs MCLR/Vpp that it's sufficient to limit current from the LM317 output pin through a 100 ohm resistor then use another 7406/7 buffer to pull the output of the resistor to near 0V. This is circuit I have on my current home grown 16C84 programmer. Works like a champ. BAJ