Jump to content
43oh

Maximum input frequency detectable by MSP430g2553


Recommended Posts

Well, simple, but not very useful, answer is fastest conversion the unit can do is a bit over 2uSec, for a bit fewer than 500000 conversions per sec, giving a max frequency that can be properly sampled of about 250Khz (Nyquist limit).

 

This is presuming that max allowable ADC clock rate of 6.3MHz and a way to store samples at this rate.

 

If you are using the internal ADC clock, the clock is not a precision device, allowing for significant variation with power supply voltage, temp, and manufacturing. This means we should really look at the max that is guarenteed achievable, which would be the lowest rate, or about 6uSec/sample, for about 170000 sampes/sec, and a max frequenc to be sampled of about 80Khz, again, presuming that you have a way to store and process the samples.

 

In reality, with all of the other issues involved, I would say audio (20KHz) is the practical high end.

 

Remember, there isn't a lot of RAM on these devices (512 bytes), so you won't be able to store very many samples before you run out. Maybe 200, maybe fewer, given that some of the RAM is needed for other things (variables, stack, etc). If the data is being shipped rght off device, there is no practical limit, as you can ship it out faster than you can read it at top processor speed.

 

See SLAS735J, P39 for timing of ADC

Link to post
Share on other sites

Please clarify: is this a digital or analog signal? [edit: yes you do say "through the analog pins" which I missed on first reading, but if the signal could be treated as digital it becomes a lot simpler]

 

For a digital signal any MSP430 device could easily satisfy your requirement using an internal clock (ACLK or SMCLK) at a known frequency and the timer capture/compare infrastructure. I couldn't say how to do it in Energia, though.

Edited by pabigot
Link to post
Share on other sites

Pusle width of pulses in pulse train? That doesn't sound analog to me, either.

 

So, in the interest of getting a meaningful answer, please clarify what the input signal is and what you want to know about it.

 

Is it analog? Digital?

Do you want frequency? Pulse width of individul pulses? Period of the periodic signal?

 

 

Addressing a couple options:

I believe Pulsein() will get the width of a digital pulse (I think it is the '1' state time), and is the appropriate tool if that is what you want. This would be appropriate when you are decoding a PWM signal.

You can also measure the period (time from rising edge to the next rising edge), though I don't know how in Energia. This can be used to derive the frequency. For example, if the period is 32microseconds, the frequency is 1/0.000032 = 31250Hz. The timing precision can be a real issue measuring single cycles/pulses.

You can also measure frequency directly but counting pulses (rising edges) for a fixed time. The simplest case is count for 1sec. Counting for a shorter time is obviousl faster, but reduces precision.

 

If the signal is analog, you need to tell us more about the signal and what you are trying to do.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...