Go Down

Topic: SD Card wont initialize - SainSmart Arduino uno and ethernet shield  (Read 5188 times) previous topic - next topic

SurferTim

OK. Thanks for the try. I guess I'll have to wait to get a w5200 shield myself. If you want, you can remove the new w5200.h file and change the original back to w5200.h.

As for this...
Sorry to come back to my issue... but its taking 20 seconds to serve my 20KB KAMDORA.HTM file...
Its extremely slow..

Is it because of the HALF_SPEED setting I set below? I am assuming the SD Card is now reading at half the speed...

Code: [Select]

  card.init(SPI_HALF_SPEED, 4);

If you are reading a byte from the SD, then sending that byte over the ethernet interface, 20 seconds sounds about right. Is that what you are doing?

Take a look at my server code. The first one is the SD based web server.
http://playground.arduino.cc/Code/WebServerST
It uses a 65 byte array, and loads 64 bytes at a time from the SD, then sends them all as one packet. That will work about 4 times faster.

Chiro

This is rarely the SD card. I get your errorCode and errorData with an Arduino Ethernet shield on an Uno when I set SD_CHIP_SELECT to SS or 10.

You should set SD_CHIP_SELECT to 4.  When I set SD_CHIP_SELECT to 4 with the Arduino Ethernet shield I get success:

When I remove the SD card with SD_CHIP_SELECT set to 4, I get this with the Arduino Ethernet shield:
Do you get 0XFF for errorData when the card is removed?  Do you get a different value for errorData with the card?
This is rarely the SD card. I get your errorCode and errorData with an Arduino Ethernet shield on an Uno when I set SD_CHIP_SELECT to SS or 10.

You should set SD_CHIP_SELECT to 4.  When I set SD_CHIP_SELECT to 4 with the Arduino Ethernet shield I get success:

When I remove the SD card with SD_CHIP_SELECT set to 4, I get this with the Arduino Ethernet shield:
Do you get 0XFF for errorData when the card is removed?  Do you get a different value for errorData with the card?
Mr. Author(sdfat.h)

i also have the issue, when i remove the card it shows 0xff to 0x0.

as you said i have to select the SD_CHIP_SELECT to 4 not ss, but still not working.. :(

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy