I usea a voltage divider (simple resistor pair) to bring the max voltage within range of A/D. I then scale the reading from the A/D to the voltage and determine battery state from that. Larry > > From: "fred jones" > Date: 2005/11/14 Mon PM 08:08:30 EST > To: piclist@mit.edu > Subject: [PIC] How to read Battery voltage with PIC > > > Hi all, > I'm sure this is an easy question for many of you so I hope I don't get > flamed. I searched but can't find the answer in the archives although I'm > sure it must be there somewhere. This is not my strong point so I thought > I'd ask for help. > > I am building a device that will run off of a 12V gel cell battery. It will > use a 16F877 PIC powered with a 7805 regulator. I'd like to be able to read > the voltage of the gel cell and display it on the 2X16 LCD display. I'm > sure I can't connect the 12V batter into the A2D of the PIC but I'm not sure > what the proper method would be. Any help is appreciated. > Thanks for your time, > FJ > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist