Conflict (solved, but wanto to share) Ethernet Shield - LCD on Arduino Mega

Hi all, first post here. I hope this is the right place. I had ethernet shield installed on an Arduino Mega, and wanted to add an LCD (2x16 for what it matters). The LCD installed directly "on top" on the Ethernet Shield does not work for geometric reasons (the ethernet connector external plate touches the connectors on the LCD), and inverting LCD and Ethernet shield position obviously is not a great choice since you cannot see the LCD behind the ethernet shield... ;) Then i connected the LCD with some wires to pins 42-44-46-48-50-52 of the Mega, so I can put the LCD where I want. The LCD starts ok but after Ethernet.begin a number of strange characters appear on the LCD, and my LCD.print did not work anymore. I moved the LCD on upper right digital pins (23-25-27-29-31-33) and it works correctly. I suppose that's something related to the Ethernet shield that initializes and uses some pin in the 42-52 range, perhaps for compatibility with older boards? I know that to get older Ethernet shield working on the Mega there was some trick involving using those pins, but I just started working with the Arduino and my knowledge is very poor.

Hope that this helps someone with my problem, or maybe that this helps fixing the problem.

I can give further details if required.

Thank you all for great community

Digital pins 50 to 53 are the SPI lines on the Mega. The ethernet shield uses those. The Uno SPI is on digital pins 10 to 13.

Ok, thank you for explaining this. But the ethernet shield is not physically connected to those pins... is that connector that there is on the center of the mega board that the ethernet shield uses? Those 6 pins marked as "ICSP"?

You are correct about the ICSP pins. Those are the pins that provide the signal lines to the ethernet shield.

On the Mega, the SPI data lines are connected to the ICSP and digital pins 50-52. On the Uno, the SPI data lines are connected to the ICSP and digital pins 11-13.

Ok! All is clear now. Thank you very much!

Thanks for sharing. It's just the right stuff for me to read before messing with my first MEGA a bit more :) BTW, the I2C pins on MEGA are also different from UNO. That caught me once :)