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)But I can't understand it very well, for example what happens if I have a PIC 16F877A working with a clock of 20MHz. Do I have to see the relationship between my frequency, for example 82.64Hz, and the clock of 20MHz and then work with your formula?
It would be really great if you could help me with an example, I'll be really thankful!
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
Your counter can not count frequency. It can count time! and F=1/T
Bookmarks