1
\$\begingroup\$

I have a 16x2 LCD display that I'm just trying to use for the first time. The model number is 1602D1 according to this datasheet from where I purchased it. I first tried attaching it to a Raspberry Pi using Adafruit's tutorial, which had the same pinouts as the LCD display I have. Now I've tried using an Arduino and I get the same results, which are shown in the picture below.

enter image description here

The LCD display never updates when I try to send text to it and only displays the blocks in the bottom row. Adjusting the 10k variable resistor doesn't seem to do anything. When I send data to the LCD, I notice it flickering slightly as if its updating, but no text is displayed. I'm simply using the code from tutorials, nothing special. Any ideas what I am doing wrong? Thanks.

For clarity because the picture might be misleading, here is how I have the pins hooked up:

LCD Pins:

  • LCD 1 - Ground
  • LCD 2 - 5V
  • LCD 3 - 10k Variable resistor middle pin
  • LCD 4 - Arduino 12
  • LCD 5 - Ground
  • LCD 6 - Arduino 11
  • LCD 7 through 10 empty
  • LCD 11 - Arduino 5
  • LCD 12 - Arduino 4
  • LCD 13 - Arduino 3
  • LCD 14 - Arduino 2
  • LCD 15 - 5V
  • LCD 16 - Ground

Variable resistor:

  • Left - 5V
  • Middle pin - LCD pin 3
  • Right - Ground
\$\endgroup\$
4
  • \$\begingroup\$ Its not entirely clear from your pic, but it looks as though you've got pin 4 of your LCD tied to ground (through the 2 green wires) as well as over to your arduino. \$\endgroup\$
    – brhans
    Mar 18, 2015 at 18:34
  • \$\begingroup\$ No, I have pin 5 tied to ground. Pin 4 goes to arduino pin 12. I'll edit my question to clarify. \$\endgroup\$
    – deltaray
    Mar 18, 2015 at 19:00
  • 2
    \$\begingroup\$ That's actually the top row, and the display hasn't been initialized properly. \$\endgroup\$ Mar 18, 2015 at 19:11
  • \$\begingroup\$ The LCD by default is in the 8-bit mode. Did you send the proper init sequence to it to use the 4-bit mode? It's probably a matter of calling the right init from the library. \$\endgroup\$
    – Alexxx
    Mar 18, 2015 at 19:35

1 Answer 1

5
\$\begingroup\$

You're reading the pins upside down.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Hey you're right. Doh! It works great now. Good thing I didn't fry anything. I should be more careful next time. \$\endgroup\$
    – deltaray
    Mar 18, 2015 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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