Yes, please! I too need an Ethernet shield for the Mega! For now, I'm using the very inelegant and complicated solution of using a Duemilanove with the Ethernet shield, connected to the Mega via serial. It's expensive, complicated and error-prone.
Are there plans to develop a Mega Ethernet shield?
Someone has put instructions on the web that tell you which pins must be connected. SPI on the mega is not on pins 11/12/13 as on the ATmega8 series arduinos, so there must be some rewiring.
I think the software is compatible once the physical connection is made.
MEGA pin 50 (MISO) to Arduino Ethernet Shield pin 12.
MEGA pin 51 (MOSI) to Arduino Ethernet Shield pin 11.
MEGA pin 52 (SCK) to Arduino Ethernet Shield pin 13.
MEGA pin 53 (SS) to Arduino Ethernet Shield pin 10.
Locate the file spi.h in the hardware/libraries/Ethernet/utility directory, under your Arduino 0015 installation.
I made the above code changes to the spi.h -- but still doesn't work. What do I need to delete? I'm using v18. Also, do I need to use any jumpers or is this just a code change and the MEGA works.
Got it working... in case anyone else needs this in the future... follow the instructions and, yes, you need to connect jumper wires from MEGA (50,51,52) for it to work.
I'm new to the Arduino and have a Mega 1280 version and was working with the ethernet shield. It is working without any wiring changes and I'm using the 021 version with the above chip/board selected. I did have some problems but they come from the default assumptions in the library for gateway being at your private ip addess .001 (eg 192.168.100.1) and I found the pin assignments in the file pins_ardinuo.h beginning at line 52. This include file is included by STI.h.
Thanks for the notes and documentation they help understand what is going on.
You really got it to work by just putting it on the Mega and not changing any wiring or any files under 0021? I cannot seem to get mine to work just putting the shield on the Mega. I have a wiznet shield.
Hey AZ... The ethernet shield I am using is labeled Arduino EtherShield SD from Sparkfun Oct 2010 and near the microSD connector is 'MEGA compatible'. It works with the simple server software for a while and then I get a connection refused error. Studying this problem shows the Max connections on the EtherShield is 4 and when they are all used up then new connections are refused. This happens easily since from what I can tell the EtherShield sends data one byte at a time inside a 60 byte packet. I started looking at packets with wireshark and was surprised at all the activity I'm seeing so I started reading about socket programming and it's taking some hours of time so far. I turned on the auto notification of replies for this topic
I have the Ethernet shield and Mega 1280 on Arduino version 21 and the above hacks did not work for me.
Instead I used the recommendation of davekw7x to redirect pins 11, 12 and 13 but leave 10 as-is. And no modification to the sources required. See the good discussion thread at cgi-bin/yabb2/YaBB.pl?num=1284605439/6 for why pin 10 is left as-is.