C/C++ Library or example code for DSP Using the TI-MSP430

爷,独闯天下 提交于 2019-12-22 08:01:15

问题


I am working on a little dsp project doing audio processing (e.g., Nyquist rate sampling, over- and undersampling, reconstruction) that is real-time embedded using my board. The current board/chip I am using is the msp430 series from Texas Instruments.

MSP430F5438 Experimenter Board <-- ( Among recommendation ) http://focus.ti.com/docs/toolsw/folders/print/msp-exp430f5438.html

First of all would you recommend buying a copy of matlab or octave as my main coding tool. I am using the CCS ( Code composer studio) from Texas Instruments of which came with my board.

Second is there any DSP (Open source) Library's for c/c++ that I can use for my project.


回答1:


I think Matlab may be useful for getting algorithms down "on paper" without having to worry about hardware. It's also useful for the various DSP functions that you may want to try (which either come with Matlab or are available as a package/toolbox). However, a function that you get "for free" in Matlab would need to be rewritten if it doesn't exist in a C/C++ library.

Also you will eventually need to get the code into the MSP - I've used CCS in the past, as well as, IAR Systems which I was very happy with.

For your second question, check out answers to this SO question which asks the same thing. One link that looks promising is this one: http://spuc.sourceforge.net/.




回答2:


Your board should have come with code examples. According to the page you linked to above, it comes with MSP430F54xx Code Examples (Rev. O) (zip 525 KB). Did you try any of these examples ?




回答3:


In general, using a high-level language for algorithmic development is a great idea. I've heard, though don't know for sure, that Code Composer Studio has integration with MATLAB to the extent that you can run MATLAB code right on your target. If

  • this is true,
  • you have the budget for it, and
  • you're not trying to wring every last gram of performance from the chip,

then this is definitely a great feature. Otherwise, Octave is a very good alternative. It is sometimes slower than MATLAB, and doesn't have some of the more exotic toolboxes, but for prototyping and learning it's perfectly suitable and FREE.

Recently I've been using Python with NumPy for prototyping, and I'm very happy with it. You might consider this rather than MATLAB/Octave, especially if you're coming from C++. The language is easy to work with, unlike MATLAB, and the NumPy (and sometimes SciPy) extension libraries provide a lot of the same basic functionality. It is also easy to call C libraries from Python, providing an easy way to port pieces of your high-level stuff into C iteratively.

As for libraries, I've also heard good things about SPUC, which gary comtois recommended. I haven't worked with a TI chip in a while, but they used to provide some of the building blocks like sin, cos, FFT, and biquad in various application notes or even as a linkable library.




回答4:


The MSP430 isn't a specialist DSP processor. However, that doesn't (necessarily) mean you can't process audio with it, but it may not be straightforward.

I'd probably try and set up a timer interrupt at the required audio sampling frequency which reads a sample from the ADC, does something to it, and outputs it to the audio DAC.

You only have a 12-bit ADC, so don't expect miracles or CD-quality audio.

void my12KHzTimer()
{
  writeDAC(readADC() / 2); // DSP loop to reduce volume by 6 dB
}

writeDAC and readADC are assumed to do what they say on the tin...



来源:https://stackoverflow.com/questions/4523943/c-c-library-or-example-code-for-dsp-using-the-ti-msp430

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!