Ethernet Shield with Mega2560

I have the standard Ethernet shield that works without modification using the Duemilanouve board.

I want to upgrade to the Mega2560 board. Can I use the same Ethernet Shield? There are lots of posts about this and the threads are confusing. Some imply yes and others state a hardware fix is required first. Can someone please state what the status is for the 2560 + Ethernet Shield?

Also, is it true that the Arduino community will "soon" release a board with an Ethernet port and CPU all-in-one?

Thanks! Al

Hello Kovalick

I just got my self in the Arduino line and they were among my first two boards, Mega2560 and the Arduino Ethernet Shield with SD. They work just fine together with only a little software change. You do not need to change the hardware in any way. Have a look at to see her help on the topic. In a nut shell you have to add two lines and change on line in many of the examples you find with the library.

pinMode(53, OUTPUT); // set the SS pin as an output (necessary!) digitalWrite(53, HIGH); // but turn off the W5100 chip! uint8_t r = card.init(SPI_HALF_SPEED, 4); // Use digital 4 as the SD SS line

Note that the pinmode has 53 and not 10 and that the SPI_HALF_SPEED has a ",4" added! Not seeing the ",4" cost me some time as it sort of worked half the time without it somehow... Anyway the SD card works great at full speed BTW for me.

Hope this helps.


Thanks Kevin! Your example seems to relate to the SD card portion of the Shield. For example, one line turns off the W5100 TCP/IP chip. At present my interest is to for Ethernet/IP access so the chip needs to be ON. Do your instructions change for using the IP portion of the card only?

Better yet, is there an Ethernet Shield that works with the MEGA2560 without modifications of any kind?

Thanks -- Al

Hello Al

Sorry I ment to say that both the SD and the Ethernet access works just fine with the Ethernet Shield and the MEGA2560 without modifications of any kind. You don’t have to change any code for the ethernet examples that come from Arduino’s ethernet library to use the network side (just change the IP address of course) and just have to change a bit of coding as I listed in my last post for the SD side.

Hope I’m clear. If you need any help with the ip change just let me know.

Take care, enjoy the weekend.

I should mention that you can of course use the SD card as a storage device and the ethernet connection at the same time. I've just started to play with it my self but you can store data and read data over the network to and from the SD card.

I haven't my self tried to have the web page data on the sd card but I am certain it can be done...