Adding another SPI device along side the Codec shield

Adding another SPI device along side the Codec shield

Postby yamanoorsai » Fri Aug 15, 2014 11:03 pm

I am trying to record audio data from the Codec chip to an SD card @ 8 kHz using the shield + Arduino Uno(not sure if it is possible - Just an experiment). I tried connecting an SD card to the SPI interface with a different CS pin. The moment I connect anything to the clock pin (D13 of the arduino) apart from the codec shield, it generates a lot of static noise. I assumed that the SPI pins are held at a high impedance state unless the CS pin is low.
yamanoorsai
 
Posts: 6
Joined: Thu Aug 07, 2014 11:15 pm

Re: Adding another SPI device along side the Codec shield

Postby guest » Sat Aug 16, 2014 8:03 am

you have 3 options for this:

1. bit bang SPI on another set of pins - not really reccomended, but it might work
2. use the UART in SPI mode - this should work well, but make USB not work
3. multiplex the SPI lines - a bit complicated, but works well

here is more info on multiplexing spi lines:
viewtopic.php?f=21&t=487

SDcards need 3.3V and a level translator anyways, so its not any extra hardware (unless you were planning on using resistor dividers instead of a level translator chip). so you put another buffer IC (like on the codec shield), and you turn only one device on at a time. you cant just connect the lines to each other, as they will fight with each other. for example: data out from codec and data out from sdcard both need to go to data in on the spi peripheral. but, these are both outputs, so if one tries to go high while the other goes low, they short out the powersupply. the output of the codec does not hi-z between data packets.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Adding another SPI device along side the Codec shield

Postby yamanoorsai » Sat Aug 16, 2014 9:31 pm

the output of the codec does not hi-z between data packets.


Thanks. I plan to write to SD card @ 8 kHz. According to my research. It is possible.
yamanoorsai
 
Posts: 6
Joined: Thu Aug 07, 2014 11:15 pm

Re: Adding another SPI device along side the Codec shield

Postby guest » Mon Aug 18, 2014 9:27 am

if you figure it out, please post back to let us know how you did it.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm


Return to Audio Codec Shield

Who is online

Users browsing this forum: No registered users and 2 guests


cron