>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. Unless u'd want to vary the output voltage in small steps my preference is to "pre-program" several output voltages you can select from through an array of resistors from ADJ pin of the LM317 and selectively connecting them to ground through a transistor. (It's shown in the applications section of the datasheet) Vin ------[ ]---------------------------- Vout | | | | | | |R| | |1| | | | !_____._____._____._____.__! | | | | | | | | | | | | | | | |R| |R| |R| |R| |R| |2| |3| |4| |5| |6| | | | | | | | | | | | ! ! ! ! | Q1 \_ Q2 \_ Q3 \_ Q4 \_ | / / / / ! ! ! ! ! ------------------------- Set R1=240R and R2=2.7K for 15V as the default and maximum output. Q1 turns on to parallel R3=9.1K with R2 = 12V Q2 turns on to parallel R4=4.7K with R2 = 10V Q3 turns on to parallel R5=1.0K with R2 = 5V Q4 turns on to parallel R6=390R with R2 = 3V That would give you a useful range, now if you were to pick your resistor values carefully, you could parallel R2,R3,R4 = ~8.8V In all, u could have 2^4 = 16 presettable voltages. Weather the output voltages are useful to you is something you'll have to figure out by playing with the resistor values. (Something i don't want to do right now... *grin*) Lastly, u might need to configure a soft start for the LM317 or use an output pin from the PIC12C508 to enable the output. If everything was SMD, it wouldn't take up much board space. Hope this helps. Terry