Tony Smith wrote: > Calculation time between pulses is pretty easy. A bike wheel is a > bit over 2000mm in diameter, say 2100mm. > > ... > > (The metric challenged are welcome to use miles, feet & cubits to > check my figures) Either you've got a very large bike, or you'd best not refer to others as units-challanged. 2100mm = 2.1m = 6.9 feet. I just happened to have a bike here, so I measured a wheel. The radius is about 345mm for a diameter of 690mm. That makes the circumference, or distance traveled per revolution 2.2m or 7.1 feet. At 60 miles/hour that comes out to 12.4Hz rotation rate. So desiging the system so work up to 15Hz sounds plenty adequate. Let's say you want a minimum of 1% speed resolution and you're using timer 1 to measure time between rotations. That means the effective timer 1 input frequence must be at least 1.5KHz. If timer 1 is running from its own 32,768Hz crystal and you use the maximum prescaler of 8, you get 4.096KHz clock rate. That easily meets the resolution spec at the fastest speed. The wrap time will be 16 seconds, which means you can measure speed down to 5.3 inches/second, or slower than you can stay on the bike. For a hobby project, you can ignore the timer wraps. The display will just show garbage until the bike is moving. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist