这是我能做到的最简单、最不模糊的内容,所以请尝试帮助我。
这意味着我想:
1)输入音轨(Anaglod)
2) 使用微控制器 ADC
将其转换为数字输出
3)然后有
微控制器/板定时器示例
选定间隔的数据。
4) 告诉董事会采取“抽样
音轨”,现在对其进行采样
比率为2B,(B表示最高
频率。
F=频率
F(Hz=1/s) Ex 100Hz = 1000(周期/秒)
F(s)= 1/(2f)
示例问题:1000 Hz = 最高
频率 1/2(1000hz) = 1/2000 =
5x10(-3) 秒/周期或采样率
5毫秒
5) 将其吐回板 ADC 并
将其转换回模拟信号,因此
输出是完美的重建
初始音轨。
使用傅里叶分析,我将确定对曲目进行采样的最高频率。
然而,从理论上讲,这听起来足够简单和直接,但我需要的是用 C 语言对其进行编程,并利用我的 msp430 芯片/实验板对曲目进行采样。
我将使用 Texas Instruments CCS 和 Octave 进行编程和调试。 这是我将要使用的主板。
问题:
C 语言适合做这个吗?我可以获得有关如何使用 C 以奈奎斯特频率对粘性进行采样的任何示例吗? C 中的哪些代码将告诉开发板使用 ADC 组件?以及任何类似或有助于我完成此项目的推荐信息。
This is as simple and less vague as I can make it, so please and try to help me out.
By this, meaning I want to:
1) Input an audio track (Anaglod)
2) Using the micro controllers ADC
convert it to a digital output
3) Then Have the
microcontollers/boards timer sample
the data at selected intervuls.
4) Tell the board to take the "Sampled
audio track" and now sample it at a
rate of 2B, ( B meaning the highest
frequency.
F= Frequency
F(Hz=1/s) E.x. 100Hz = 1000 (Cyc/sec)
F(s)= 1/(2f)
Example problem: 1000 hz = Highest
frequency 1/2(1000hz) = 1/2000 =
5x10(-3) sec/cyc or a sampling rate of
5ms
5) Spit it back at the boards ADC and
convert it back to analog, thus the
out-put is a perfect reconstruction of
the initial audio track.
Using Fourier Analysis i will determine the highest frequency at which I will sample the track at.
However in theory it sounds easy enough and straight forward, but what I need is to program this in C and utilize my msp430 chip/Experimenters board to sample the track.
Im going to be using Texas Instruments CCS and Octave for my programming and debugging. This is my board that I will be using.
Questions:
Is C the right language for this? Can I get any examples of how to sample the tack at nyquist frequency using C? What code in C will tell the board to utilize the ADC component? And any recommended information that is similar or that will help me on this project.
发布评论
评论(3)
我不太明白你想做什么,但我会回答你的具体问题。
是的,C 语言是最合适的语言。
您可能应该查看 Texas Instruments 网站上的应用程序代码,了解如何与 ADC 交互。您可以从 示例代码开始://focus.ti.com/docs/toolsw/folders/print/msp-exp430f5438.html" rel="nofollow">您链接的页面。它有 C 代码,展示了如何使用 ADC。
顺便说一下,ADC 仅将模拟转换为数字。要将数字转换为模拟,您需要一个 DAC,但该板似乎没有。
I don't fully understand what you want to do, but I'll answer your specific questions.
Yes, C is the right language for this.
You should probably look at application code on the Texas Instruments website to see how to interact with the ADC. You can start with the example code listed at the bottom of the page you linked to. It has C code that shows how to use the ADC.
Incidentally, an ADC only converts analog to digital. To go digital to analog, you need a DAC, which this board does not appear to have.
5) ADC 不进行数模转换,因为它是 ADC,而不是 DAC。但您可以使用带低通滤波器的 PWM 来输出模拟信号。
以奈奎斯特频率采样信号通常是一个坏主意。这将导致高频下出现大量混叠。例如,频率为 F-deltaF 的信号,其中 deltaF 很小,看起来就像由 2deltaF 调制的 F 幅度。
这就是为什么 CD 采样率为 44.1 kSPS,而不是 30 kSPS(15 kHz 的两倍——更高的频率限制)。
5) ADC doesnt do Digital-to-Analog Conversion, 'cause it's ADC, not DAC. But you may use PWM with Low-pass filter to output analog signal.
It is often a bad idea to sample signal at Nyquist frequency. This will cause lots of aliasing at high frequencies. For example signal with frequency F-deltaF, where deltaF as small, will look like F amplitude modulated by 2deltaF.
That's why CD sampling rate is 44.1 kSPS, not 30 kSPS (as twice 15 kHz -- higher frequency limit).
您必须以信号最高频率两倍的频率对信号进行采样。否则会出现混叠效应(原始信号失真)。通过傅里叶分析无法确定信号中的最高频率,因为要执行 fft,您必须将模拟信号转换为数字值 - 使用转换频率(您希望通过 fft 确定)。
输入信号中的最高频率由模拟输入滤波器定义,信号在模数转换之前必须通过该滤波器。
You have to sample the signal with a frequency that is twice as high as the highest frequency in your signal. Otherwise you get aliasing effects (distortion of the original signal). It is not possible to determine the highest frequency in your signal with fourier analysis because to perform an fft you have to convert your analog signal to digital values - with a conversion frequency (that you want to determine with the fft).
The highest frequency in your input signal is defined by the analog input filter that the signal must pass before analog to digital conversion.