Pages: [1]   Go Down
Author Topic: Ethernet shield + SD Card not working  (Read 1151 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm getting very frustrated and annoyed at this thing, i've been trying for days.

Setup is Duemilanove + Ethernet shield (Wiznet 5100) + SD card adapter
Arduino-1.0, code is Examples>SD>cardinfo

The example works out of the box with SD CS on pin 4 and no ethernet shield connected
The ethernet shield works with webserver example (whether SD connected or not)
But SD won't work when the Ethernet is connected,

Ethernet CS is default pin 10, SD CS is set to pin 4,
Here is a trace without ethernet connected and working


Here is a trace with ethernet connected and SD not working


When i zoom in on the trace it looks like the ethernet shield is grabbing the clock and not letting go, it also shows alot of traffic on the MISO line, this is the ether shield not SD.

I hope someone can understand what im trying to get across as im not good at explaining.

The goal will be to store web pages on SD and transfer them to the ether shield
it's about 30 seconds from exiting through the window right now

Thanks
Shaun
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The standard Ethernet shield already incorporates an SD shield. What type do you use if your's don't have the SD adapter? If it does, I guess the SD card adapter on the Ethernet shield conflicts with the one on the separate shield (both are using pin 4 as CS).
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My ether shield is one of the older ones which has the solder pads for SD adapter but not fitted so yes pin 4 on the shield is used but just connected to a blank pad, i've tried pins from 4 to 9 and SD will not work when ether shield is connected
Logged

Miramar Beach, Florida
Online Online
Faraday Member
**
Karma: 139
Posts: 5855
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Links to the device datasheets would help.

Are you disabling the w5100 SPI while setting up the SD card? Try just the SD init first. Don't do anything with the w5100 (except disable it) until you figure out why the SD fails. Leave the ethernet shield connected, just don't set it up yet.

Compile and upload this sketch.
Code:
#include <SD.h>
#include <SPI.h>

void setup() {
  Serial.begin(9600);

  // disable w5100 SPI
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);

  // set up SD card
  if(!SD.begin(4)) Serial.println("SD fail");
  else Serial.println("SD ok");
}

void loop() {

}
Do you get ok or fail?
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for that, no it fails, it might be the shield and probably the reason it never had a SD cage fitted, I'll keep trying though
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What shields are you using? The "original" shields from Arduino itself?
Logged

Pages: [1]   Go Up
Jump to: