Pages: [1]   Go Down
Author Topic: due can't connect with SD card  (Read 478 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have an Arduino DUE but I don't have a ethernet shield,
I have searched on the web how to assign a SD for playing a sound effect (I use a micro SD) and I found a picture (you can see it below) but it doesn't work (it is possible that the problem is in the code) and I don't know where I have to assign the pin. So my question is where do I put the pins (and how to assign them) on the Arduino or what is wrong with my code?

Luc

* sound1.ino (1.27 KB - downloaded 4 times.)

* Due_and_SD_001.png (91.59 KB, 649x600 - viewed 13 times.)
« Last Edit: September 13, 2014, 09:36:56 am by Luc-Immerzeel » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no, no, NO,
that's wrong
use as CS pin N°4 to work with te arduino IDE 1.5.x example.
also, other connections are bad, and probably you burned the SD card, because you connected 5V as MOSI.
use this:
http://www.jbprojects.net/articles/wrt54gl_mods/sd_pinout.jpg
and this as reference:
http://www.robgray.com/temp/Due-pinout-WEB.png

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow!! thank you!!

The speaker is working and is playing the right sound (I think),
because the speaker has a lot of 'snow', so the sound file cannot play clearly.

We have tried to adjust a few values in the code, but they make no difference.

Thanks in advance!

Luc
Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12486
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All SD cards and microSD are 3.3V maximum.  You also need 10k pullups on
some lines IIRC.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 1
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

10K pull up, are for open drain pins, as in I2C bus, in SPI there's no need of them.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Erictronico,

thank you for your reaction but I'm a new bee and don't understand exactly what you mean by your answer and what I suppose to do now, can you please explain you answer more easily.

Thank you in advance,
Luc
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well, first, English is not my native language, it may be why you do not understand.
what I mean is that you should only connect wires as shown in this image.
then use SD example to test the conections.
if you are using DAC as output, remember the offset of 1.65V dc, YOU CAN'T USE A SPEAKER DIRECTLY, you need to use a amplifier between the arduino and the speaker, and use a capacitor (10 uF, positive on DAC) between the arduino and the amplifier.


* sd_pinout.jpg (117.8 KB, 597x523 - viewed 8 times.)
Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12486
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

10K pull up, are for open drain pins, as in I2C bus, in SPI there's no need of them.

We're talking SDcards and microSD, pullups are needed I think.  Found this:
Quote
The SD physical layer specification does not have much to say about pullup resistors, except that they should be used to prevent excessive current from floating inputs. That applies especially to pins 8 and 9 on the card (the ones on opposite ends), which are not used in SPI mode.

Basically any floating input is bad news, especially on ultra-high frequency inputs
like the native-mode bus.  Given the large variety of SDcard makes out there, protect
yourself from the poorly compliant ones by being paranoid.
« Last Edit: September 13, 2014, 06:49:37 pm by MarkT » Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 1
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, you are right, it´s  a precautionary measure.
Logged

Pages: [1]   Go Up
Jump to: