Ethernet Shield and SD Card

userHead cosmicboy 2011-04-06 04:49:28 6505 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

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=][/url]) was neccessary to access the SD card on my DFRobot Ethernet Shield v2.0 ([url=][/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!

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.
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?

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

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


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