私は dsp プロジェクトを行っており、アナログ ファイルを取得し、dsp ボードの ADC に接続されたマイクロコントローラーを使用してデジタル出力に変換したいと考えています。これをCでどのようにプログラムしますか?
少なくとも私はそう思います。
これは私が必要なものです。
入出力
アンゴログ --> デジタル
デジタル --> アナログ
私は dsp プロジェクトを行っており、アナログ ファイルを取得し、dsp ボードの ADC に接続されたマイクロコントローラーを使用してデジタル出力に変換したいと考えています。これをCでどのようにプログラムしますか?
少なくとも私はそう思います。
これは私が必要なものです。
入出力
アンゴログ --> デジタル
デジタル --> アナログ
You really need to clarify your question. Like what do you mean by analog file? File systems are binary from a programming perspective, sure the media is magnetic or other technologies and there is analog involved. An ADC goes from Analog to Digital, so it is an an analog input not a digital output.
ADC analog to digital converter, takes analog inputs to the device and converts them to digital so you can use them inside the chip, program, save to files, etc.
DAC digital to analog converter, takes digital values and converts them to analog outputs.
In both cases you need to look at the specific details for the chips and the board. From a programming perspective if nothing else you need to look into the details for the ADC and or DAC. Microcontrollers having an ADC is not uncommon, but you need to read up on how to get the ADC on that microcontroller to initiate a sample, how to know when the sample has completed and how to read the digital data once the sample has been taken. DACs are often external, sometimes serial, so you may have to bit bang spi or i2c or look into what hardware the microcontroller might have for speaking spi or i2c or if there is a dac in the microcontroller, how to use it (what registers to write, etc).
If you have a specific publicly available microcontroller board, for example an eval board, then that makes it much easier for folks here or elsewhere to show you where to look for the schematics, data sheets, etc. Otherwise, even knowing exactly which microcontroller and what I/O pins are used, would be helpful when asking such a question. There are probably lots of example programs out there that could be borrowed from. And it could be as simple as a few lines of C to an existing library, or as complicated as many lines of C with interrupt service routines, and possibly some assembler.
これはハードウェアに大きく依存しており、質問には実際の回答を可能にする情報はありません。
一般に、システムのドキュメント、特に AD/DA 部分を確認する必要があります。良い例があるはずです。特定の問題がある場合は、より具体的な質問を投稿してください。