Not a DC supply, but I did a PIC based regulated AC supply to run a halogen lamp in a dental curing lamp. I use a triac and phase control to vary the RMS voltage to the lamp. The 250W 24V lamp runs on an autotransformer that also has an isolated secondary to power the PIC. An opto isolator carries the gate signal from the PIC back to the line connected triac. The tap on the autotransformer for the lamp is about 30V. We then phase control that down to 24V. The tricky part was figuring out how to measure the RMS voltage the lamp was getting to adjust the firing time on the triac. I finally ended up saying the transformer secondary voltage is proportional to the primary and lamp voltages. So, I use the PIC A/D to measure the instantaneous voltage on the transformer secondary (isolated from line). Each A/D sample is squared and added to a sum. 256 samples are taken, then the average computed by throwing away the bottom 8 bits. The square root of this average is taken to give the RMS voltage. A compare register in the PIC is incremented or decremented to move the triac trigger time as required. Since the PIC knows when the triac is on (it's telling the triac when to run), the RMS computing routine adds in a zero when the triac is not on, and the appropriate squared instantaneous secondary voltage when it's on. Works pretty well and has been shipping for several years. Harold -- FCC Rules Online at http://www.hallikainen.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads