Andre Abelian wrote: > Since it is RPM > counting 1 minute makes no sense so my question is how fast I should > count pulses to determine RPM? That depends on the update rate and resolution you need. If both are high enough, counting pulses won't do it. Usually these kinds of things are easier to do by using a CCP module in capture mode. This can very accurately measure time between successive pulses. Apply a little low pass filtering, then invert. If you just want to detect whether the speed is above or below certain thresholds, then you don't need to invert. You can pre-compute the measure= d period values for each threshold of interest. > I setup to read every 4th pulse Bad idea. Count every pulse, and you get 4x more resolution or update rate= , or some combination of the two. Keep in mind that signals in cars can be noisy. Even if the 0 and 1 levels are fine, the noise will cause jitter on the edges. Pulses within a single revolution may not all be symmetric or spaced exactly evenly. Always do a little low pass filtering on the period in these cases. Fortunately this i= s easy to do with a reasonable time constant since you get a new measurement every pulse, and usually you don't need to update the speed anywhere near that fast. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .