> 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. No, that will not work. It may work a few times, but with 8 cells you will get a good peak only when the cells match perfectly. They won't do that very often. Also delta-V on NiMH is pretty mild. Works OK on NiCd. Cheerful regards, Bob Blick -- 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