Arduino Mega 2560 with Ethernet Shield 4.0

Hello,

I'm using an Arduino Mega 2560 with Ethernet Shield 4.0 (the one that out-of-the-box doesn't work with the Mega).

I've rewired ports 10(SS)-11(Mosi)-12(Miso)-13(SCK) to 53-51-50-52 (as seen in the file "hardware/arduino/cores/arduino/pins_arduino.h" (On OSX).

However, I am unable to let the Ethernet shield respond to ping-requests. 100M is full on, FD is on, RX flashes, Link is on (but flashes on RX..same behaviour with external power), but it never sends data (TX always off).

Does anyone have a clue what might be wrong?

Hi all,

I finally fixed this after fiddling around with this for a couple of days. Most information about this topic isn't accurate anymore, and the hack is incorrect for the latest libraries.

If you want to connect a mega to an old-style ethernet shield, route pins:
-13(ethernet) to 52 (mega)
-12(ethernet) to 50 (mega)
-11(ethernet) to 51 (mega)
leave pin 10 connected, contrary to many posts!!
This is tested on Arduino 0021 on OSX.

Thanks! This fix got it to work for me (0021, Ubuntu, Freetronics Ethernet Shield v1.0).

How did you know to leave pin 10 as-is? (and why do all the other examples out there say to reroute it?)
My pins_arduino.h (0021, Ubuntu) showed:
const static uint8_t SS = 53;
const static uint8_t MOSI = 51;
const static uint8_t MISO = 50;
const static uint8_t SCK = 52;
which suggested to me that pin 10 (SS) on the shield should be rerouted to pin 53 on the arduino.