One more thing to watch out for. A dead Lead Acid battery is not 0V. = It's 12.00V or so. Each cell is about 2.0 to 2.2 volts....6 cells and = it's 13.2 for fully charged and 12.0 for empty. =20 And I'm with the group on this one....a resister division network and a = PIC with A/D is the way to go.... Tim >>> olin_piclist@EMBEDINC.COM 12/02/03 06:39AM >>> Matt Redmond wrote: > Basically I care about only three states: A total lack of > power (e.g., V-no_battery =3D 0V), the engine is not running > (V-battery =3D about 12V) and the engine is running > (V-alternator =3D about 13-14V). > > Any way I can do this by using just two inputs on my PIC? > I'd like to avoid a chip that has an a/d converter if > possible. Why? Two resistors and a capacitor tied to an A/D input seems like the obvious and simple answer. Many PICs have a built in A/D, and there is usually at least one in a subfamily. You could do this with a couple of opamps or comparators. Since you don't need high accuracy, you could use bipolar transistors instead as comparators. Another option is use a 12F675 to look at the voltage with its A/D, then output the two digital signals you want. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com=20 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu