2
\$\begingroup\$

I have a 16x2 LCD shield that I have tested to be working fine when connected to arduino uno using the following pin connections:

3: RW
5: EN
6,7,8,9: DATA(4 bit mode)

The contrast is nice and dark and the text gets displayed properly.

However when I make the same connections to a UNO + Ethernet Shield two things happen
1. The contrast goes all light
2. LCD does not get initialized (row of black boxes)

As per the page here the ethernet shield uses the pin D2, D4, D10-D13, hence i chose the pin assignment above.

Now this has stumped me, why would adding the shield make a difference? Any ideas ??

\$\endgroup\$
  • 2
    \$\begingroup\$ Perhaps the ethernet shield library inadvertently changes some of the LCD pins. Try compiling the original LCD only code and see if that works. It could also be that the Arduino can't supply enough power for both the LCD and the ethernet shield, but I doubt that would be a problem as I have seen projects that use both before. \$\endgroup\$ – ben Apr 3 '12 at 21:09
  • \$\begingroup\$ @ben as per the page here, the comment by user "njohnson" states that the shield uses all the digital pins except 1,2 and 8. based on this i tried hooking up the lcd to the 6 analog pins (as outputs) and its working fine now. Now the question is where/how can i study the shield schematic to be sure what all pins can i use. On a side now, it seems an unusual design decision since using the shield means sacrificing 13 of the digital pins ! \$\endgroup\$ – Ankit Apr 3 '12 at 21:14
  • \$\begingroup\$ @Ankit sounds like you have an answer to your question. \$\endgroup\$ – Kortuk Mar 10 '13 at 14:27
  • \$\begingroup\$ @Ankit the link in you comment is broken, it should be forums.adafruit.com/viewtopic.php?f=31&t=18359#p94736 \$\endgroup\$ – Bigwave Feb 19 '15 at 9:57
  • \$\begingroup\$ @Ankit also, you should add your comment as an answer and accept it. Otherwise this question appears as unanswered and as there are no answers (accepted or otherwise) people may not view this (and find the solution) \$\endgroup\$ – Bigwave Feb 19 '15 at 10:00
2
\$\begingroup\$

As suggested by user ben, the issue was that the ethernet shield was using pins that I was trying to use for the LCD.

On page here, the comment by user "njohnson" states that the shield uses all the digital pins except 1,2 and 8.

Moving the LCD pins to the 6 analog pins (as outputs) solved the issue.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.