Arduino LCD 12864 and Ethernet W5100 shield clash

I have stacked the LCD12864 LCD Arduino Shield with the ICQUANZX Ethernet Shield that uses the W5100 R3 chip.

Each shield on its own works correctly but when I take a sketch that runs the LCD and just add a call to Ethernet.begin() the LCD stops working.

Is there a workaround for this apparent clash of shields or do I need to try different shields for either the Ethernet or the graphical LCD?

Thank you for any advice!

I think I can answer my own question (after some research and experimenting):

Clash of SPI bus pins 10, 11 and 13 which are used by both shields.

If I cut in to pins 10, 11 and 13 going up from the Ethernet shield to the LCD shield and patch them through to pins 5,6 and 3 respectively (pin 4 is used by the SD port) and then replace this constructor:
U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);
with
U8GLIB_NHD_C12864 u8g(3, 6, 5, 9, 8);

Then both shields work together!

1 Like