Frequency measuring

Frequency measuring is done by counting moments when signal is crossing its average value.
Algorithm requires capturing at least 3 periods of signal. If less is captured flag bFreqValid will not be set and fFreq value will be undetermined.
When noise level in input signal is high there is a risk of detecting more crossing points than expected. To avoid this simple hysteresis scheme is used:

measure_freq.gif

Generated on Wed May 15 22:42:22 2013 for miniscope v3 by  doxygen 1.5.9
Tomasz Ostrowski