Counter, which is one of the most common electronic devices, has been adding with many useful features. Well, you might quite familiar with the ordinary counter, but do you know that you can use an AVR controller and turn it into a powerful counter?
Seriously, this can be done, although it needs a bit more involved with a PIC. You must know that a PIC has an asynchronous counter input, and it able to handle frequencies up to application 40 MHz. Most of the time, an AVR’s have a synchronous counter input, where is sampled with the clock frequency.
You have to remember one thing here. When you’re using 4 MHz clock, please make sure the input frequencies must be lower than 2 MHz.
By starting an AVR counter, you can start to measure the input frequency. During the period, wait a few minutes and stop the counter again. You’ll know the frequency, if you’re reading the counter register properly. It sounds very easy, isn’t it?
Well, things can be so complicated, if you use an external prescaler to measure higher frequencies.
By the way, since this a very high frequency 2.5 GHz counter, thus you should handle it carefully and mind about the high voltage as well!