Michael Rigby-Jones wrote: > The period of just one > tooth on the 16 tooth wheel at 200RPM would be a whopping 188ms, This is WAY off, observe: (200rev/min / 60sec/min) = 3.333Hz shaft speed 3.333Hz * 16 teeth/rev = 53.33Hz tooth frequency 1 / 53.33Hz = 18.8mS tooth period > so you > wouldn't need to poll the inputs particularly quickly to get a > reasonable precision. Except that this is based on a value that is off by an order of magnitude. > (the CCP module is great for arbitrary rate interrupts > with no timer loading overhead) Yes, a CCP module can be used to generate a periodic interrupt. However, my first choice for this is timer 2 since it's less useful for other stuff. > By running a counter for each > input and storing the value on a rising (or falling) edge you can > easily and quickly make a multi channel counter. But he wants speed, not total elapsed revolutions. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu