mega 2560 and SPI

I am using th eethernet shiled on the mega without problems. But reading the documentation I get surprised that things work. If the SPI on the mega is on pins 50 (MISO), 51 (MOSI), 52 (SCK) and 53 (SS) how is possible that we can use one shield made for the UNO SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK)?

SS for the Ethernet chip (WizNet5100) is always on pin 10, the rest of the pins (MISO, MOSI, SCKL) are taken from the ICSP header (the 6 pin header almost in the middle of the board).

thanks! Do you know if there is a way with to use also the i2c with a shiled made for the UNO? (I know on the uno are pin 4 and 5 for the mega 20 and 21)

On newer UNOs the I2C pins (SDA and SCK) are to the left of the AREF pin which also is the case for the newer Mega2560 and the Leonardo. Most shields are not made for the UNO but for the older Duemillanove which didn't have these pins so compatibility may suffer there.

If you have to use such shields a solution often seen is to cut pins A4 and A5 of the shield and connecting them with jumper wire to the pins 20 and 21 on the Mega.

You see similar problems with the new Due boards operating at 3V3 instead of 5V. Although the IOREF pin is on all newer Arduino boards almost no third party shields use it. All of them will not work without tweaks on the Due.