If clock=20mhz and you counter is running at 5mhz then the counter is counting in 0.2uS steps. If the counter=1 then 0.2uS. If the counter=10 then 2uS. 100=20uS 1/20uS=(50khz)
If the frequency you want to look at is 82.64hz then the counter will read 60503. There are 60503 * 0.2uS in 82.64hz.
5,000,000hz/82.64hz=60503
Time=0.2uS X timer-count
F=1/Time
Thank you so much! that's easier. So now the question will be, What value should I use on my code? Timer-count values or just time values? My guess is Timer-Count values, Am I right?Your counter can not count frequency. It can count time! and F=1/T
Bookmarks