Frequancy Meter


Here is my new Frequency meter who was done with a LCD's cellular phone!!!  This is a simple project. The Frequency is passing  through an op-amp to convert it in a square wave. The ouput of the op-amp is feeding the 3*8 bits counter (24 bits) who can accumulate at a maximum of 16777216 count. 

The maximum frequency you can measure without changing the time base of one second is 16.777216 Mhz.  The ATMega8 have 3 functions: enable the counter gate at each second, read his value and display it on the LCD.


  • Small box
  • Frequency and period display
  • Auto Scale
  • LCD back light




Source Code

29 Comments to “Frequancy Meter”

  • Anton June 25, 2010 at 6:55 am

    Where the scheme to connect the display?

  • admin June 25, 2010 at 12:11 pm

    It’s pin to pin with the LCD connector

  • Anton June 27, 2010 at 5:45 pm

    The display connects to JP1 HEADER 5X2 ?

  • MicroSyl June 27, 2010 at 9:37 pm

    In this project the LCD is mount direct on the PCB there is no flat cable

  • Anton June 28, 2010 at 6:29 am

    I can not understand, you can upload PCB please

  • xoom July 20, 2010 at 6:43 pm

    For what is this green PCB? :) looks like buzzer or smt.

  • admin July 20, 2010 at 6:45 pm

    It's a power inverter to generate 100volt at 1khz for the backlight LCD


  • Anton July 20, 2010 at 7:05 pm

    Hello. I can not compile a file, an error
    ! E <library> (245): (linker) area 'data' not large enough. Need 455 bytes
    hi lo 335 767 size 433
    ! E <library> (245): (linker) area 'bss' not large enough. Need 511 bytes
    hi lo 343 767 size 425
    Process terminated with status 1 (0 minutes, 2 seconds)
    0 errors, 0 varnings. Help!

  • admin July 20, 2010 at 7:07 pm

    Your MCU selection in ICC is not the good one, or you try to fit too large in too small

  • xoom July 20, 2010 at 7:44 pm

    You using  Fluorescent lamp?  Im imagine that it's looks very nice with that backlight  :)

  • admin July 20, 2010 at 7:52 pm

    Yes it's good, but I prefer led backlight, you don't need inverter

  • xoom July 20, 2010 at 7:58 pm

    It's not so difficult to make that inverter :) using TL494 or somthing other to generator and make small transformer for HV :)

  • Anton July 22, 2010 at 5:19 pm

    Please publish hex-file, fails to compile

  • admin July 22, 2010 at 5:25 pm

    I no longer have the hex file, I only keep the source file of all my project



  • wgking March 17, 2011 at 11:59 am

    it's look like very good!

  • reza September 1, 2011 at 11:52 am

    i didnt understand where to connect the lcd!
    would you please explain??

  • admin September 1, 2011 at 11:54 am

    JP1 Header, check the LCD pinout


  • mikey October 7, 2011 at 1:51 am

    i didnt understand what 's role of the J1 header!
    would you explain it?

  • admin October 7, 2011 at 12:27 pm

    J1 don’t do anything It was for future expention


  • guojin wang October 19, 2011 at 6:38 am

      what is the counter chip's model?74LS590?
      can you can you tell me?

  • Sylvain Bissonnette October 19, 2011 at 12:28 pm

    I think yes, don't have the project in my end, compare the datasheet of the 590 pinout and the schematic

  • Vladimir April 26, 2012 at 4:59 am

    Hello Sylvain! I have interest for this project and I have tryed to compile with an ICCAVR v8 demo compiler with the limitation of code 64k – many errors. This compiler has another project file – CBP instead PRJ. What a version of ICCAVR have You used?  Can You send a HEX (and EEP?) file ? I have a Nokia 3210 LCD (LPH7677-1) symilar to 3310
    Best regards

  • admin April 26, 2012 at 12:02 pm

    Give me your personal email address

  • Vladimir April 28, 2012 at 5:44 pm

    ICCAVR v8 demo, ICCAVR v7 demo can't compile this project, but ICCAVR v6.31a demo can it

  • Sylvain April 28, 2012 at 8:29 pm

    Maybe this project was done many years ago,  I was maybe working under ICC v6

  • Vladimir May 5, 2012 at 7:38 am

    ICCAVR v6.31a can compile this project.
    The "bss" problem is in the file NokiaLCD.c :
    ICCAVR v7.23 can compile this project, but with activated option "Treat 'const' as '__flash' "
    ICCAVR v8 can compile this project, but with one change in NokiaLCD.c
    __flash static const byte FontLookup [][5] =  instead of  static const byte FontLookup [][5] =
    Radio amateurs from Russia and Ukraine have tested  this project and make cnanges. This project can be compiled in AVR Studio 4 too, but ported to AVR GCC (big changes). 

  • auto body repair July 10, 2013 at 7:38 pm

    I like the helpful info you provide in your articles.
    I’ll bookmark your blog and check again here frequently. I’m quite sure I’ll learn lots of new stuff right here! Best of luck for the next!

  • Julio Erdmann July 16, 2014 at 2:42 pm

    Mr Bissonette,
    I'm looking for your power supply project but I can't find it here. Have you put it away from your blog? Would you please send me the project to my e-mail? 
    Thank you

Post comment

Please note

All my source codes were taken from my personal projects.

Everything is for your information only. The C/C++ codes have been written
with ICCAVR. You can find the header and source CRT files by downloading their compiler.

All is for your information and everything is AS IS without any warranty of any kind. No other files are available and I don't make any modification for any body.



Electronic Links


AGC Anemometer AVR AVR Bootloader Bootloader Capacitence Capacitor Clock Color Control DCC Debugger Devices Digital driver Function Generator High Gain Microphone Humidity Inductance Inductor Laser LCD LED 3W Library Lightning Detector MegaLoad Meter Moodlight Mood Light MS5534 Nixie OscilloScope projector Rain Fall Sensor rgb RGB LED Scop Sensor SHT75 Temperature Terminal Tipping Bucket Train Modeling Vintage Water Detector