I have some troubles with my W5100 ethernet shield. It exactly the same as this one on picture
Im trying to make adapter board for this shield to use it on breadboard with Arduino Nano. I connect power pins(+5V,GND), other data pins (13,12,11,10,4) and reset pin. But when i program the arduino with basic WebServer sketch, i cannot get to arduino(yes i have set MAC and IP)
If i use ethernet shield on Arduino Duemilanove i can connect to it without problems.
I think that this shield that im using does some communication through ICSP header.
Anyone with the same problem ?
The SPI data pins are on the ICSP connector. Only the Slave Select pins (digital 10 for w5100 and 4 for SD) are not.
So if i make wire connections on the ethernet shield from pins 13,12,11 to ICSP …it should work 8)
That is correct.
edit: Connect pins 11-13 on the Arduino to the ICSP pins on the shield is what I meant. That is presuming the Arduino has no ICSP pins.
Another question :P If im using just SD card i can connect just 13,12,11,4 and power ? or i need to connect 10 too ?
You must either
1) connect the w5100 SPI Slave Select to digital pin 10, and set it as OUTPUT and HIGH
2) connect it to +5v to disable it
If not, it will corrupt data on the SPI bus.
OK, lets see if i understand ...
pin10 HIGH, pin4 LOW ....for SD
pin10 LOW, pin4 HIGH ....for ethernet
That is correct, but only done in setup(). Once that is done, they are handled by the low level read/write routines in each library. This is what I use:
// disable w5100 while setting up SD
if(SD.begin(4) == 0) Serial.println("SD fail");
else Serial.println("SD ok");
// SD.begin returns with its SPI disabled so nothing needs to be done
// Ethernet.begin() returns with its SPI enabled, so disable it.
// rest of your setup here
edit: I added error checking on the SD.begin() routine.