I2S with AIC23B
These are my notes for getting the mbed hooked up to an AIC23 (TI I2S audio codec) chip, with the intention of using the mbed as a platform for DSP-based audio effects. For those not familiar, I2S stands for "inter-IC sound" and is a way for integrated circuits to communicate information about digital sound, which the LPC1768 conveniently has hardware support for.
Here is the specific chip I'm using: http://focus.ti.com/lit/ds/symlink/tlv320aic23b.pdf It contains a stereo ADC and DAC, at up to 96 kHz sampling rate with 24-bit resolution. It also has a headphone and microphone amp.
I got the TSSOP-28 package, which is actually a SSOP package (it's a "large" TSSOP, which means the lead spacing is .65 mm, which as it happens is SSOP spacing. Don't know why TI calls it TSSOP). To use it on my breadboard, I got this SSOP-28 adapter from SparkFun: http://www.sparkfun.com/commerce/product_info.php?products_id=500 If you are afraid of soldering this SSOP package, I recommend SparkFun's SMD soldering tutorial (and the corresponding wick-based method): http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=36 It's not bad if you have a good soldering iron and some experience.
I believe at least a few other people have gotten an I2S device working with the mbed. Here are the resources for doing so that I've found thus far:
- I2S pinout, and some discussion: http://mbed.org/forum/mbed/topic/199/
- Mark B's porting of Keil I2S code: http://mbed.org/users/macaba/programs/i2s/600c5
- Some info on I2S interrupts: http://mbed.org/forum/mbed/topic/849/
- I2S emluation with SPI: http://mbed.org/forum/mbed/topic/167/
- Another notebook on I2S, without much info: http://mbed.org/users/simon/notebook/i2s-dac/
- mbed demo display uses I2S DAC, but has no info about it yet: http://mbed.org/cookbook/mbed-Demo-Display
- Here someone is the AIC23B as a DAC for an ARM-based MP3 player: http://embdev.net/articles/ARM_MP3/AAC_Player
|Name(s)||AIC23B Pin||mbed Pin|
- Connect a .1 uF and 10 uF (polarized, + to pin, - to ground) cap in parallel to pin 16, VMID
- GND and V+ should have at least one filtering cap (eg, .1 uF)
- Mode and CS should be grounded (not sure about this!)
while ( !I2SDMA0Done || !I2SDMA1Done );I believe this means that the DMA interrupt never happens. Not sure, and I'm not sure where to go from here either. I believe this could be because the AIC23B also needs some SPI or 2-wire circuitry in order to control it (eg, it uses 2x I2S SDA, CLK, and WS connections in addition to a serial interface for controlling it). Not sure!
You need to log in to post a comment