Olin Lathrop wrote: > Andre Abelian wrote: >> Lets say to measure each period I still need to setup a fixed time >> right? > > No, you set up a free running counter that is incremented at a fixed know= n > rate. =A0On smaller PICs like a PIC 16, this will be timer 1. =A0The CCP = module > then captures a snapshot of timer 1 whenever a pulse comes in. =A0In the = CCP > interrupt, you subtract the new reading minus the previous reading to get > the timer counts between them. > That's a good point. And you could take not the first previous reading, but also, say, N-th previous reading, depending on the mechanical properties of the system. This would average readings on last N values. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .