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...
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?.