← Revision 5 as of 2011-06-15 21:28:19
|Deletions are marked like this.||Additions are marked like this.|
|Line 25:||Line 25:|
|* [[attachment:wm8731_datasheet.pdf|WM8731]]||* [[attachment:WM8731.pdf|WM8731]]|
Audio Codec Shield
About the Audio Codec Shield
The MICrODEC went on a diet, and it can now fit into its summer clothes - the Arduino! The Audio Codec Shield is an Arduino shield that uses the same Wolfson WM8731 codec which can do up to 88kHz, 24bit stereo. The Audio Codec Shield has 1/8" stereo input and headphone output jacks, a single pole analog input aliasing filter, and 2 potentiometers for varying parameters in your code.
The Audio Codec Shield pins out all of the useful pins on the codec, including the microphone pins, the line in and line out pins, the headphone pins, and the midrail bias voltage pin. This extends the Shield's productivity beyond the Arduino, to a general purpose breakout board for the codec. It also has a 5V to 3.3V level translator so it can be used with most microcontroller platforms. And the enable pin on the level translator is pinned out, in case you want to multiplex your SPI line.
The WM8731 has a lot of useful features, and routines have been written for most of them for both Arduino and Maple (the 32bit Arduino alternative). The codec is DC coupled on both the input and output, so you can even use it as a high quality ADC and DAC, all the way down to a 2kHz sampling frequency. The variable sampling rate comes in handy when using the Arduino, as there isnt much processing power available. But don't worry, the Maple gives at least a 4x performance increase from our tests.
The Audio Codec Shield can be used with any microcontroller, but we have layed it out for the Arduino and Maple to get more people involved in making interesting musical applications. To help promote this, we have also made a number of example sketches and libraries to get you started quickly. The main programming structure follows that of the MICrODEC: the program initializes the codec, and then waits in the main loop until it is interrupted by the codec, at which time it executes your code in the interrupt service routine. This gives the best audio quality, as it ensures that nothing else will delay the processing of your audio data. But, this also means that all of your functions must fit within the time allotted between audio samples, and other functions that rely on interrupts can't be used (like delay()). Different programming structures can be used, but this one is the easiest and gives the best results.
Due to the differences in hardware between the Maple and Arduino, the sketches for one platform can not be used with the other. Below are sample sketches for a simple delay for both platforms.
Files: Version 1.0