Pages: 1 [2]   Go Down
Author Topic: SD -> Arduino -> DAC?  (Read 1838 times)
0 Members and 1 Guest are viewing this topic.
Connecticut
Offline Offline
Edison Member
*
Karma: 17
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

which is what is on the breakout board linked above. (10k)
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 17
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you think that the SD lib included with Arduino 022 is fast enough for audio playback? Also, should I get a buffer chip to buffer the SD lines (MOSI, SCK, SS)?


baum
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 17
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just did some research on the I2C DAC: If in fast mode (400kbps), I can clock out one value (2 bytes) in 40us, giving an ideal maximum sample rate of 25khz. This is just enough for 22khz sample rate wav. However, in high-speed mode (3.4Mbps), one cycle is only ~5us, giving a max sample rate of 212kHz(!) Is this to fast for the arduino? If not, I would love to use the high speed mode and free up some pins...

Also, do I need a buffer on the SD card? is 40mA enough?

Thanks!
baum
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However, in high-speed mode (3.4Mbps), one cycle is only ~5us, giving a max sample rate of 212kHz(!) Is this to fast for the arduino?
Remember that the I2C bus is dependent on the clock rate you send it. We are just talking about the maximum rates here. There is no problem with sending data at any rate up to the maximum. With the arduino running at 16MHz I think the maximum clock rate for the I2C bus will be 4MHz but you would have to check the data sheet.

Quote
do I need a buffer on the SD card?
What do you mean by this? You defiantly need some logic level converters resistive potential dividers don't always work.
Current requirements for SD cards vary so you are better off regulating down to 3V3 from 5V.
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 17
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am running this whole setup from 3.3V (everything...) so no converters are needed... I'm just wondering about an actual buffer if the AVR i/o pins can't handle the sd card requirements.

Quote
4MHz
I2C high speed mode is 3.4Mhz...

baum
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I2C high speed mode is 3.4Mhz.
Yes so? The arduino hardware is capable of going faster than this it doesn't mean you have to make it go this fast.

If the whole system is 3V3 then I would not expect you will need a buffer.
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 17
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So high speed mode should work for my purposes.
Logged

Pages: 1 [2]   Go Up
Jump to: