John Payson wrote : >An alternative which will always give maximal accuracy, but which requires >a little more calculation effort, is to time as many pulses as will fit in >a second; then take the time from the first to the last and divide that >into the number of event intervals received. If the signal is, e.g., >100.7Hz you may receive 101 pulses, with 993,050us between the first and >the last. Dividing 0.993050 into 100 event intervals yields 100.700Hz (if >the time is accurate to within 10us). This approach is often far more acc- >urate than pulse-counting or period-measurement alone. NOTE: When using this scheme: The beginning of the 1 second period (window) should be synchronous with (begin at the same time as) the event (pulse) and only the subsequent events are to be counted in the 1 second period. If the 1 second window begins more than one-half event period after the event, then one too many events will fit into the 1 second window. SO: the 1 second window must start less than one-half event period after the event. The easiest way to ensure this is to start the window at the event. Roger ******************************** Certified Jowett Nut (If you have to ask..you are better off not knowing about Jowetts)