ArduinoGeneral

Ethernet Shield and SD Card

userHead cosmicboy 2011-04-06 04:49:28 6607 Views5 Replies
Hi, I received my Ethernet shield today, and was wondering whether the SD card is supposed to work now. In an earlier post from last year I read, that from last November on it was supposed to work, but I can't get it to work with the standard examples from sdfat lib.

When running SdFatInfo I receive the following output when trying to read a formatted SD card:
card.init failed
SD error
errorCode: 1
errorData: 0


Cheers,
cosmicboy
2012-05-03 00:27:58 thanks Al Pacifico for sharing. userHeadPic R2D2C3PO
2012-05-02 20:14:52 While looking into this, I found the following change to the standard SD library's CardInfo example ([url=http://arduino.cc/en/Tutorial/CardInfo]http://arduino.cc/en/Tutorial/CardInfo[/url]) was neccessary to access the SD card on my DFRobot Ethernet Shield v2.0 ([url=http://www.dfrobot.com/wiki/index.php?title=DFRduino_Ethernet_Shield_(SKU:DFR0125)]http://www.dfrobot.com/wiki/index.php?title=DFRduino_Ethernet_Shield_(SKU:DFR0125)[/url]) :

I added digitalWrite(10, HIGH) after setting the mode for the SS pin and it worked.

(BTW I am using Arduino 1.0).

[code]diff -u /tmp/CardInfo.ino ../CardInfo/CardInfo.ino
--- /tmp/CardInfo.ino 2012-05-02 05:01:26.297364339 -0700
+++ ../CardInfo/CardInfo.ino 2012-05-01 20:20:23.440696937 -0700
@@ -42,7 +42,7 @@
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output
  // or the SD library functions will not work.
  pinMode(10, OUTPUT);    // change this to 53 on a mega
-
+  digitalWrite(10, HIGH);

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
[/code]

I spent a while scouring the web to figure this out, so I'm posting it here in hopes of saving time for those that follow. This should be enough to get you started in solving problems with the other SD card access issues with this version of the Ethernet shield.
-Al
userHeadPic Al Pacifico
2011-04-15 05:14:09 Hi Lauren,

thanks for the links. I had already found and tried those solutions, but none seems to work for me.

Anybody else maybe who found a workaround solution?

Cheers,
cosmic
userHeadPic cosmicboy
2011-04-07 18:24:14 Hi,

I just find some suggestion and solution for you.Hope it will be useful.

[url=http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281785804/4]http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281785804/4[/url]
[url=http://john.crouchley.com/blog/archives/662#comments]http://john.crouchley.com/blog/archives/662#comments[/url]
[url=http://www.arduino.cc/playground/Main/EthernetShieldSDHardwareSPIMod]http://www.arduino.cc/playground/Main/EthernetShieldSDHardwareSPIMod[/url]
[url=http://www.dfrobot.com/wiki/images/5/52/Ethernet_shield_SCH.png]http://www.dfrobot.com/wiki/images/5/52/Ethernet_shield_SCH.png[/url]

Lauren
userHeadPic Lauren
2011-04-06 13:54:10 The ethernet shield with big SD slot do not support SD card read yet.

The latest version which has mini sd slot will work.  But it is still under manufacturing.
userHeadPic R2D2C3PO