I currently have an Arduino Ethernet Shield which is Mega Compatible. I've found on the Arduino Ethernet Library https://www.arduino.cc/en/Reference/Ethernet that the Shield uses different Pins on the Arduino Uno and Arduino Mega. How is this possible? The Ethernet shield isn't connected to those pins mentioned.

Arduino Uno: Pin: 13 - SCK Pin: 12 - MISO Pin: 11 - MOSI Pin: 10 - SS for Ethernet Controller

Pin: 4 - SS for SD Card

Arduino Mega: Pin: 52 - SCK Pin: 50 - MISO Pin: 51 - MOSI Pin: 53 - SS for Ethernet Controller

Pin: 4 - SS for SD Card

Arduino Mega Pins

2 Answers 2


Those 4 pins D50 to D53 are the ICSP pins which appear twice on the MEGA; the Ethernet Shield uses the second set of connections located in the middle of the Mega board.

The header files gets told (by the Arduino IDE) that the board is a MEGA so the compiler uses those pin numbers to connect.

  • The SS pin is not on the ICSP header. It needs to come from one of the headers on the side still.
    – CrossRoads
    Commented Dec 12, 2018 at 15:44

Firstly, I am assuming you are using an Ethernet Shield similar to the Arduino Ethernet Shield.

Secondly, I assume that you are referring to the following quote on the Ethernet Library page:

The Arduino board communicates with the shield using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used as SS. On the Mega, the hardware SS pin, 53, is not used to select the Ethernet controller chip, but it must be kept as an output or the SPI interface won't work.

This communication interface is called SPI.

The Ethernet Shield connects to the SPI interface (ie MISO, MOSI, SCK) using the in-circuit Serial Programming (ICSP) pins which are also connected to the SPI interface pins (ie. pins 50, 51, and 52)

Underside of Ethernet shield

As noted in the above quote, pin 53 is not used as the SS pin (but needs to be kept as an output pin and not used). Pin 10 is used instead for the ethernet SS pin on both the Uno and Mega.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.