Hi Kevin, Check this site : http://www.angelfire.com/electronic/hayles/charge1.html He did something same. I am designing a similar circuit and have not even asked tehse questions myself so i am interested in ideas of others / your results. grtz Simon >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 :) > __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- 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