Universal frequency meter


This is 7-digit frequency meter measuring frequency from 10 Hz up to 1300 MHz. It is based on ideas of PIC16F84 based frequency meter.
The measuring range is divided into two subranges: 10Hz - 25MHz and 25 MHz - 1300MHz. The decimal point is after MHz digit, but can be set at any position.

The same hardware can be used as digital scale (software should be addopted).

Hardware is very simple:

It contains:

  • PIC 16F84
  • 74HC137 (BCD -> 1 of 8 decoder)
  • SAB6456 VHF-UHF divider by 256
  • 7-digit calculator display (common cathode),
  • some resistors, capacitors and 2 switching diodes

Note: "Calculator display" means (say) 7 digit LED multiplexed display. Common cathode display is used. Software is written for common cathode. For common anode displays it requires some software and hardware modification .

PIC is used as 3 byte counter. If it counts 0.1 s maximum measured frequency is FF FF FF, e. g. 167.77215 MHz (theoretically) - practically 25 - 30 MHz. SAB6456 is used as 1:256 predivider. Its upper limit is 1300MHz.

The device uses internal prescaler of PIC as low byte of counter, TMR0 as middle byte and some register as high byte of counter. The software DOESN'T read anything from any input port. RA4 is used as prescaler input.

Measuring period is 100 000 us (HF) or 256 000 us (VHF and UHF).

The main steps during measuring period:

  1. start measurement,
  2. precode decimal value of digit to segments,
  3. if it's correct digit set decimal point,
  4. output to PortB,
  5. output digit number to PortA,
  6. test TMR0 overflow bite, if YES increase TimerH,
  7. leave digit to light,
  8. increase digit number,
  9. if <7 goto 2,
  10. else zero digit number, decrease counter and goto 2,
  11. stop measurement,
  12. test TMR0 overflow bite, if YES increase TimerH,
  13. shift out precounter content,
  14. check signal at RB0 and switch range accordingly,
  15. recode 3-byte value into 7 decimal numbers,
  16. goto 1.

Total timing formula:

For low frequency N = Fx * 100 000/4
For VHF-UHF N = Fx * 256 000/4 respectively

N = T*[7*(34+3*T1)+6+3*T2]+9+9*T3+Z


  • T,T1,T2,T3 - are initial values of timing loops,
  • Z - are additional fine tunig NOPs,
  • Fx - Xtal frequency in MHz.

The values for T,T1,T2,T3 and Z you can easily find using my program. To calculate values for low frequency use ledxt123.exe, for VHF/UHF use ledxt123.exe program.

You can get source code.

Some ideas were taken from "Simple low-cost digital frequency meter using a PIC 16C54" (frqmeter.asm) written by James Hutchby, MadLab Ltd. 1996.

This software is free for private usage. It was created for HAM radio community members. Commercial exploatation is allowed only with permission of authors.

Frequency meter schematics:


Frequency meter PCB: (54x41 mm)


Components placement:



 [ About me | Acronyms  | CW | Data Sheets | Docs | Download | E-mail | HOME | Ham projects | Hobby circuits | Photo galery | PIC | QTH photos |
Sign in my guestbook | View my guestbook ]

© 2001 - YO5OFH, Csaba Gajdos