Hello!
how to measure frequency using zero crossing technique ???
and i am using 1 msec timer for this ... please i need ur help guys.
- What is the frequency you want to measure?
- What do you mean by 1 msec timer? Is it a timer with one millisecond resolution or a timer
going up and rolling back to 0 every millisecond?
It is also highly recommended that you take several samples, and then to average them.
It depends on:
- The resolution you want to have
- The frequency of the AC wave
- The clock frequency of the counter (or timer) you use.
Example 1 : if you measure 50 Hz with a 25 MHz clock timer, then you will get approximately
500 000 counts per period, which might be OK in many cases.
Example 2 : if you measure a 10 MHz AC wave with the same counter, then you will have either
2 or 3 counts per period. In this case, the best way is to create a long timer (for example 100 ms)
and count the AC periods during these 100 ms. In this case, counting 10 MHz with a 100 ms timer
would result in 1 million AC waves in this period, which is sufficiently accurate.
In this case, the problem is that you have to calculate the frequency.
Dora