Frequency counter

This Frequency Counter is suitable to display the frequency of a frequency generator with an analog setting. It is a very simple counter and can be used as a module in a box with a frequency generator. It does what it says, it measures frequencies up to 2 MHz and shows the frequency on a 6 digit 7 segment display. The resolution is 10 Hz, we have
Frequency counter - schematic

only 6 digits because I once got a bag full of 3 digit common anode displays and here we already use all available pins on an Atmel ATTiny2313. Here you see it in a box with two frequency generators and it shows the frequency in kHz. In the box, on the left is a 15Hz to 30 kHz dds sine wave generator and on the right is one with the famous XR2206, the switch below the display switches between the right and left side frequency display. Here it shows the maximum frequency of the XR2206. Components needed for this small project are one Atmel ATTiny2313, eight 220 Ohm resistors, two 3 digit common anode displays and one 4 MHz quartz, which I just had in the box. It`s possible to use e. g. a 8 MHz quartz which would extend the frequency to 4 MHz but then the the gate routines need adjustment, easy to do. It is programmed in assembly language and compiled with gavrasm. Timer/Counter1 is used as the frequency counter and Timer/Counter0 for the gate time. At Timer/Counter1 count input T1 PD5 (Pin 9) the frequency is measured. A square wave should be present at this input so it could be wired to a Schmitt trigger front end as e. g. a 74HC132 to shape sinewaves. With a prescaler of 64 and a compare value of 125 a Timer/Counter0 Compare Match A interrupt fires every 2 ms. This interrupt is used for for gate timing and to update the display. One software counter counts to 50, then stops Timer/Counter1 and displays the result. The gate...

Leave Comment

characters left:

New Circuits