Measuring the period with MSP430

Hello:

Would appreciate comments/suggestions on methods for measuring the period of an audio-range signal with MSP430 (specifically MSP430F1612), with the highest resolution allowed by this MCU, especially if you have direct experience with that.

Thanks. Marius Hancu

Reply to
Marius Hancu
Loading thread data ...

What is the nature of the signal? If it is a simple waveform, feed it into a zero crossing detector and use a timer clocked off MCLK to measure the distance between pulses.

Reply to
larwe

That's exactly how I do it on an MSP430.

--
Grant Edwards                   grante             Yow!  The SAME WAVE keeps
                                  at               coming in and COLLAPSING
                               visi.com            like a rayon MUU-MUU...
Reply to
Grant Edwards

Insufficient information. Audio can range from 40 hz to about 17 khz or more. You don't specify the accuracy needed. You may well need to measure both period and frequency. You may need to average multiple measurements. You don't even specify the length of sample you have.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

Averaging over 10 or more periods should be possible.

Thank you all. Marius Hancu

Reply to
Marius.Hancu

If you are measuring single tone, zero crossing would be fine. Otherwise, you have to A2D the signal and FFT it. In that case, the A2D sampling rate is important. Generally, you can do roughly:

  1. 20KHz with AVR
  2. 50KHz with MSP
  3. 100KHz with ARM

Your maximum signal frequency is half of the above. Namely, 25KHz max for MSP430F1612.

Reply to
linnix

Interesting numbers. Thanks.

Marius Hancu

Reply to
Marius.Hancu

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.