AVR frequency meter from 1Hz to 10MHz

Frequency meter with some of quite good performance, capable of measuring frequencies from 1Hz to 10MHz (9,999,999 Hz) with a resolution of 1 Hz over the entire range. Ideal for function generators or as a standalone meter. It is cheap and easy to make, with parts that can be bought anywhere, and with a small size that allow it to be mounted in the panel on any device.
The circuit consists of seven 7-segment displays, AVR ATtiny2313  u Controller, and a few transistors and resistors. AVR does all the work and other ICs are not needed here. Its work is simple, AVR counts
AVR frequency meter from 1Hz to 10MHz
pulses on the input given at the time of 1 second and displays the result. The most important thing is very accurate time base, and this is handled by 16-bit Timer1 in CTC mode. The second, 8-bit timer counter operates as Counter0 and it counts pulses given to its input, the T0 pin. Every 256 pulses it causes the interruption, where program increases the multiplier. When we receive  the 1 second interrupt , the content of this multiplier is multiplied by 256 (shifted left by 8 bits). The rest of the pulses that counter got, are written down and added to the result of the multiplication. This value is then broken into single digits that can be displayed each on a single display. After that, just before leaving the 1 second interrupt,  both counters are reset at the same time and the measurement starts again. AVR in his spare time is multiplexing 7 displays. More details in the source code that I put in the attachment
Read More: AVR frequency meter from 1Hz to 10MHz

Leave a Comment

Your email address will not be published. Required fields are marked *