You could also use a single PIC output pin with PWM. This sounds like a good way to make a NiMH PWM battery charger. What frequency should the PWM be at to control the LM317. Anyone care to describe a simple control circuit for a F628 and a LM317 ? I am not sure how I would control the LM317 with the PWM pin from the PIC. I have eight 1500Mah AA's, for a 9.6v battery pack and was looking into designing a smart charger for a PIC. TIA, Kevin -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu