frequency meter with 8052 ( 8051)

is there any body knows how i can build ''6-digit frequncy meter'' by using 8051 (or 8052).?

Reply to
Loading thread data ...

I know, but if I told you, I'd have to charge you! ;-)

Seriously, you've asked a question that can't be answered fully in a few paragraphs. There are people here who know how to build a

6-digit frequency counter by using an 805X processor, but it's a job that requires signifcant engineering.

Do you need to measure 10.0000Hz to 6 digits, or

350,000Hz to 1 Hz?

What are the input signals like? (sine waves of variable amplitude, or digital signals)

What will you use to display the output? LED or LCD digit array, or serial connection to a PC?

The answers to questions like these can make a major difference in the design of the hardware and firmware.

Mark Borgerson

Reply to
Mark Borgerson

There seem to be a lot of choices on Google:

formatting link

I am sure you can find something close.

Reply to

What is your target Fmax ? & Gate times ?

A generic old 89C52 is not the ideal device; Look at AT89C51ED2, (newer, better peripherals), or maybe the AT89LP2052, or C8051F3xx series.

The simplest scheme is to use the uC HW as much as possible; for Freq you want Cycles/FixedTimeSample.

The 89C51ED2 allows true HW, where you use Timer2+T2OE, in FREQ_OUT mode, to trigger a CAPTURE of the Externally [Fu] Clocked PCA [Needs external wire T2 -> CEX0], on a fixed capture timebase. Those hard-sampled cycle values are then further added/averaged in SW.

A 22.1184MHz Xtal and Timer2, reload value of 55296, will give 10ms snapshot edges on T2 output pin, to capture the Fu counts.

Then total 10,50,100 of those, for 0.1, 0.5, 1.0 second gate times. Fmax in is just over 5MHz, as the PCA counts at

Reply to
Jim Granville

While you can get a large number of (meaningless) digits, you really need an accurate time base/clock source. To get 6 meaningful digits, you need a clock better than 1 ppm, for 7/8 digits, you would need some kind of TXCO or run the crystal in a temperature compensated oven. With a typical microprocessor crystal, you would expect to get 4 or 5 meaningful digits, unless you lock your time base to an external accurate source such as GPS or NTP (with long integration times).


Reply to
Paul Keinanen

It's only possible if you want a fairly low spec unless you use an external counter/timebase and just use the micro to control it.

Reply to

If it can be a PIC then look at

formatting link

It goes up to 50MHz and is really simple.

Reply to

i have to build it for my microcontroler lesson, and i will not use it for money ofcourse. it should have LCD screen.

Reply to

You could always connect a controller to a frequency meter via GPIB.

Reply to
Everett M. Greene

Don't use a 8051. Takes 12 clocks to execute one instruction. Use a modern micro that has a "capture" function.

Something like an Atmel ATmega88.

If you must use the 8051, use a variant. Dallas Semi (now Maxim) makes a tripler that executes instructions every 4 clock cycles. Crystal makes the only 8051 that executes an instruction in one clock cycle.

Reply to

This is irrelevant unles very high speeds are necessary in which case there are plenty of modern 8051s that execute in 6, 4 or even single cycles

'Modern' 8051 variants have capture functions. The advantage of the 8-51 is a wide range of hardware and performance variants to choose from but a common instruction set and development tools.


Reply to
Ian Bell

You should update your info :

I think you meant Cygnal, now Silicon labs ? Their C51's clock to 100MHz

Atmel also make 1 cycle AT89LP2052's; clocks faster than the Mega88.

Maxim have 1 cycle 89C51's, also clock faster than the Mega88....

Others are also doing 1 cycle 80C51's....

Pretty much everything above the lowly 89C52, has Capture ability.


Reply to
Jim Granville

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.