We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all, I have a audio.wave to convert into raw format to input into Analog Device DAC AD7302. As I am using DS80C400 as my MCU, I will need to have the audio conversion decoding to be done in C. What are the steps that I need to do? Is this correct: Read the audio wave from memory (RAM) and do conversion through reading the following: fscanf( infile, "%4c", &RIFFsize ); fscanf( infile, "%4c", &type ); fscanf( infile, "%4c", &fmtchunk ); fscanf( infile, "%4c", &fmtsize ); fscanf( infile, "%2c", &format ); fscanf( infile, "%2c", &channels ); fscanf( infile, "%4c", &samplerate ); fscanf( infile, "%4c", &average_bps ); fscanf( infile, "%2c", &align ); fscanf( infile, "%2c", &bitspersample ); fscanf( infile, "%4c", &datchunk ); Then input into DAC D0-D7 and output. Please advise if the above is correct.
You should install a Evaluation Version of the ARM Tools (http://www.keil.com/demo) and have look into the VoicePlayer Example for the MCB2130 board. This contains nearly everything you need to handle RIFF/WAVE audio in PCM encoding. (\Keil\ARM\Boards\Keil\MCB2130\VoicePlayer)
Hi Matthias, Thanks. I downloaded the file and had a look. The ARM MCU (LP2130)itself is has a ADC & DAC conversion. The program also includes the A/D conversion. My MCU (DS80C400) does not have A/D or D/A conversion, it will be done externally by a AnalogDevice IC. I only require the D/A conversion. However, i think the riffwave.h should be helpful for me.