0

Ethernet Shield - SD card not working - 2098854-0013133852
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Ethernet Shield - SD card not working - 2098854-0013133852

by jimmie on Mon Aug 12, 2019 10:15 am

I have received my Ethernet Shield (W5500) Order Confirmation No: 2098854-0013133852

https://www.adafruit.com/product/2971

I have been unable to get he SD card to work and almost sure it is defective. The Ethernet port does work.

I have already tried a couple of 2GB cards. I have tried the regular SD library. I have tried examples from different libraries. I have also tried the library below:

http://wiki.seeedstudio.com/W5500_Ethernet_Shield_v1.0/

I have tried that shield with 3 different Arduino boards. Same problem. SD card error from the software "initialization failed!".

Code: Select all | TOGGLE FULL SIZE
if (!SD.begin(4))
  {
    SerialASC.println("initialization failed!");
    return;
  }
  else
  {
    SerialASC.println("SD initialization D O N E.");
  }


I have other less-expensive shields, both 5100 and 5500-based and they all work with SD cards.

jimmie
 
Posts: 15
Joined: Thu Jun 15, 2017 3:34 am

Re: Ethernet Shield - SD card not working - 2098854-00131338

by adafruit_support_mike on Wed Aug 14, 2019 1:13 am

Just to confirm, are you sure you have the pin IDs correct for the SD card's SPI interface?

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ethernet Shield - SD card not working - 2098854-00131338

by jimmie on Wed Aug 14, 2019 6:31 am

Hello,

I am not sure what do you mean by SPI pins IDs?

Where do you set those?

What are the settings?

Shouldn’t the shield just work since I am trying it on a standard Mega?!

Thanks.

jimmie
 
Posts: 15
Joined: Thu Jun 15, 2017 3:34 am

Re: Ethernet Shield - SD card not working - 2098854-00131338

by adafruit_support_mike on Wed Aug 14, 2019 11:39 pm

Different microcontroller boards have signals connected to different pins.

The Mega's SPI signals are connected to pins 50, 51, and 52, and are also broken out on the 2x3 programming header. The Arduino Uno puts the same signals on pins 11, 12, and 13.

You'll need to declare the pins that have the SPI interface and the CS signal for the SD card in your code.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ethernet Shield - SD card not working - 2098854-00131338

by jimmie on Thu Aug 15, 2019 6:31 am

Thank you for replying.

Can you tell me where in the code? A few code lines would be very helpful.

I never had to do that and the Adafruit website does not show it.

Thanks in advance. I hope I can get it working.

jimmie
 
Posts: 15
Joined: Thu Jun 15, 2017 3:34 am

Re: Ethernet Shield - SD card not working - 2098854-00131338

by jimmie on Mon Aug 19, 2019 4:46 am

Hello,

I tried your recommendation but it is not working.

I would like to return the shield for store credit.

Please let me know what I need to do?

Thanks.

jimmie
 
Posts: 15
Joined: Thu Jun 15, 2017 3:34 am

Re: Ethernet Shield - SD card not working - 2098854-00131338

by adafruit_support_carter on Thu Aug 22, 2019 7:54 pm

If you are using SD examples stand alone, it may be that they are not taking care of the chip select pin for the WIZ5500. The other thing to make sure is the card is FAT16. See here for formatting details of the SD card:
https://learn.adafruit.com/arduino-ethe ... reparation
and try running the example here:
https://learn.adafruit.com/arduino-ethe ... nformation
note how it sets the chip select line for the WIZ5500 high:
Code: Select all | TOGGLE FULL SIZE
  pinMode(W5500_SS, OUTPUT);     // set the Ethernet SS pin as an output (necessary!)
  digitalWrite(W5500_SS, HIGH);  // but turn off the W5500 chip for now 

adafruit_support_carter
 
Posts: 12975
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.