Hi all, For my next project, I want to initiate some action when my car exceeds approximately 10mph. The "speedo" sensor is some kind of proximity switch on the output end of the gearbox/diff. So, the output it a 12v ish square wave, of frequency proportional to speed. My multimeter measures the frequency at about 20 Hz at 10mph. So, to measure this frequency, my idea is to use the CCP, in capture mode, with an appropriately prescaled timer. My Capture ISR will increment a counter each time the CCP event fires, if the timer represents a (period) shorter than 40ms (ie, faster), and, when the counter gets to an appropriate number, perhaps 20 ish, I'll inititiate the other code. Idea of using the counter is to filter out any bounces or other muck in the line. Leading to my first question- does this plan seem like a workable idea? I've not much experience with a) pic and b) the automotive envorinment. Secondly, is the question of how to interface the 12v square signal with the pic? I'd thought of using an optoisolator, but is there a better, or simpler way of protecting the pic from a) getting 12v not 5v and b) any dirty spike type things? I think I need a relatvely high impedance, because the signal goes into the ECU, so if I steal too much of it, I may make the car rather ill. Appreciate your thoughts. Jon -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu