I'm wondering if anyone can shed some light on this, because I'm totally stumped.
I have an Arduino Mega 2560 that I am using as a MODBUS device using an Ethernet Shield 2 and the Modbus library from the official website. I also have an LCD 1602 that is being driven by the Arduino.
Each of these, the Modbus functionality and the LCD, individually works. I can read and write holding registers over TCP. I can print text to the LCD screen. But I can't do both.
I've narrowed it down to Ethernet.begin(mac, ip). If I comment that out, the LCD works. If I leave it uncommented, the LCD is blank but the network communication works.
I'm using pins 52, 50, 48, 45, 43, 41, 39 to drive the LCD (4 data pins). There should be no conflict with the ethernet shield as the shield does not connect to any of these.