Go Down

Topic: Bug in Arduino Ethernet shield when used with LCD (Read 885 times) previous topic - next topic


This is the weirdest error I have ever encountered. On line 203 we call a web server function that sets up the Ethernet IP and Mac Address

void WebServerSetup()
  Ethernet.begin(mac, ip);

This is called on line 391. These lines are somehow screwing up the LCD screen as it is now just printing
"fffffffff" across it. I believe there is something going on where 0X00 is being shared somewhere as 0x00 is in the mac address.

I have no idea what is going on here. If we remove the function the Ethernet doesn't work but the LCD works fine. With that function the LCD prints nothing but 'fffff' which is 111111111..... in Binary. If anyone has any idea what is going on here I am absolutely stumped


The code is attached.


May 09, 2011, 10:47 am Last Edit: May 09, 2011, 10:52 am by Grag38 Reason: 1
You can not use pin 50 and 52 for your lcd, because it's used by the ethernet shield as I remember.

I try to find the link that talhs about that.


"Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general i/o. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface won't work.

Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. To do this with the SD card, set pin 4 as an output and write a high to it. For the W5100, set digital pin 10 as a high output."

the link : http://www.arduino.cc/en/Main/ArduinoEthernetShield

Go Up