SunFounder W5100 for Arduino Mega 2560 and LCD Shield with Keypad: ISSUE

I bought the W5100 Shield for my Arduino Mega 2560 ( I am using the K3NG Rotator Controller program to make a Ham Radio Antenna Rotator. K3NG spent a lot of time as well as others on this program and my hat is off to him. However, I have spent a lot of time fixing LCD display bugs. He never finished the coding for an LCD display with I2C. I finally got that fixed. However, I bought one of those HD44780 LCD display shields with the pushbuttons for control. ( I thought that would be a really nice, self-contained package. After figuring out the pinout to the Arduino I changed the code and it works.

However, before I added the new shield, I had the project running with PSTRotator over Ethernet using the W5100 shield and the I2C LCD with no errors. When I stack the new shield and load it, the display works, but now I cannot connect with the Ethernet. When I puill the LCD shield off and revert to I2C, the Ethernet starts working fine again.

The original code used a 4-bit HD44780 display and all I had to do was assign the correct pinout for the LCD shield as it is also 4-bit parallel.

I beleive there is a pin collision occuring and I thought I read about it, Bit I can’t find it again. I think it had to do with A0, but not sure.

Another operator changed the Analog input for the Position Potentiometer to A5 in the K3NG code to avoid issues with the W5100 shield.

Any help is appreciated.


Please provide us with the wiring diagram of your module, and the code file you are currently running, so that we can reproduce the problem.
Please also provide us the video or screenshot of the problem.



I have attached my Google Drive link to everything you requested.

The Code is modified from K3NG code in GitHub.

I bought TWO of the LCD+Keypad Boards. I always try to by two in case of a problem like this one so I can modify it.

In essence: Plug in the raw board, unpodified, and the Ethernet W5100 stops working.

I am communicating with a program called PSTRotator for Windows PC. It communicates with whatever Rotator controller you select, via whatever communications port you choose.

I chose K3NG using Ethernet.

In order to use K3NG, you have to either UNCOMMENT the 4-bit LCD code in several places and COMMENT the LCD code, or vice versa.

The Ethernet runs fine without your raw board. As soon as I add it, it stops working.

I modified the 4-bit LCD code with the correect data and control pins per your information. I can get it to work WITHOUT the Ethernet board.

The first thing I did was modify the second LCD+Keypad board. I removed the parallel LCD and swapped it for a 44780 LCD with I2C adapter. I then rmounted it atop your board and the W5100. They run fine together. No issues.

I took the board without any LCD and plugged it in. The W5100 would not operate. I found that D10 was the immediate problem. Your circuit to control the Backlight is holding the D10 line HIGH. This is shared by the W5100 board. I bent the pin back so as to not make contact with the W5100 and it works fine. No issues.

The next issue is: looking at the data and control lines you use, they collide with the W5100.

The third issue: A0 and A1 are usedi by the W5100 board. I have to re-route your A0 line to A4 for Analog Input.

Basicalkly, as I see it, it is unusable with the W5100.

Have tyou tried using it with a W5100?

Best Regards,

George Blake

We don’t have access.
Please open up viewing access for us.

Try this one. If it doesn’t work, provide me with a direct email.


George Blake

[K3NG Arduino Rotator Controller - Google Drive]

(K3NG Arduino Rotator Controller - Google Drive)

Our W5100 module uses only four pins 10-13, you have added two expansion boards to the W5100 module, please check the wiring pins of the two expansion boards to see if there is any conflict with each other.