Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

frequency counter using at89s51

Status
Not open for further replies.

joajas

New Member
Hi, I need to determined a square digital waveform's frequency. Any suggestions on how to do that?? I am thinking of using one of the i/o pins as input from and external source and determining that the frequency of the waveform on that input is 424hz. Please advice...
 
joajas said:
Hi, I need to determined a square digital waveform's frequency. Any suggestions on how to do that?? I am thinking of using one of the i/o pins as input from and external source and determining that the frequency of the waveform on that input is 424hz. Please advice...

There are two basic ways of doing it, you can either count the number of pulses in a specific time (usually one second to give a direct frequency reading), or (for lower frequencies) you can measure the wave length and calculate the frequency from a single cycle. For 424Hz I would suggest the wavelength method is your better option.

There's a very old PIC application note for a frequency counter, it uses the hardware timers fed from the external input to provide a 50MHz auto-ranging frequency counter - which drops to wavelength measuring on lower frequencies. I presume an Atmel processor has similar facilities?.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top