John Payson wrote: > An alternative if you don't mind using an opto (which would isolate > the PIC from what you're controlling) would be this: > +-----+ > In---| 317 |----+------ Out > +-----+ | > | R1 > | | > | Opt > | | > +-------+ - - - test-point 1 > | | > Cap R2 > | | > Gnd Gnd > Anyone else ever seen anything like that circuit? How does it look? Well, that's one way of doing it. Another trick which comes to mind, is that if the controlling PIC is sharing the variable supply, as it generally is in a programmer, then a resistor from the reference pin on the LM317 (TP1 on above diagram) to a PIC pin could be used to pull the voltage up or down by a certain amount. When (default) tri-stated, the regulator would revert to the nominal 5V value. Rule-of-thumb tells me that as R2 is three times R1, then the effect in reducing the voltage would be much larger than in increasing it, which suits from the fail-safe point of view. Of course, two resistors and two PIC terminals gives nine voltage options VERY simply (of which four are slightly higher than 5V and four are significantly lower). How about that (or have I been pre-empted in the last two days?). Cheers, Paul B.