Hi Everyone, I am attempting to build a smart battery charger for NiMH batteries (8-AA), with a F877. I am going to use PWM to control a LM317, and sample the voltage with the ADC to look for the delta V. I was planning on: (I got these from Panasonic) trickle charge .05C which would be 5% duty cycle Soft charge .20C which would be 20% duty cycle fast charge .75C which would be 75% duty cycle I have a couple questions: 1.) What frequency should the PWM be ? 2.) Anybody know a simple circuit to control the LM317 with the PWM PIC pin ? 3.) How often should I use the ADC to look for the delta V to turn off or switch to trickle charge ? Any help would be appreciated. Thanks, Kevin PS. I am a programmer not an EE, if you couldn't tell from above :) -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics