16x2 backlight works but characters don't display

I own the simplest 16x2 HD44780 display that you can find. 16 pins - VSS, VDD, VO, RS, RW, E, D0 - D7, A, K. I'm using the LiquidCrystal library.

I followed several guides, including the one on the Arduino website. I tried several different pin layouts only to find the characters not showing on the screen. On the other hand, the backlight works fine. Turning the potentiometer does nothing.

Since I went through multiple pin layouts (alternating my code to accommodate the current pin layout) I can safely assume that the pins are not the problem. Also, I did the tests on 2 separate Arduinos (Uno and Nano).

What can I do? Is my LCD broken?

DanteeChaos:
I
Since I went through multiple pin layouts (alternating my code to accommodate the current pin layout) I can safely assume that the pins are not the problem.

The code and the connection between the Arduino and the LCD are related.

The code and the connection between the Arduino and the LCD are related.

... and we have to see your versions of both in order to help you.

Don

I have exactly the same issue:

I found different pinouts: from www.elegoo.com, they use the following:
/*

  • LCD RS pin to digital pin 7
  • LCD Enable pin to digital pin 8
  • LCD D4 pin to digital pin 9
  • LCD D5 pin to digital pin 10
  • LCD D6 pin to digital pin 11
  • LCD D7 pin to digital pin 12
  • LCD R/W pin to ground
  • LCD VSS pin to ground
  • LCD VCC pin to 5V
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)
    */
    with the call:
    LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

I tried also the original Arduino example:
/*

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)
    */
    with the call:
    LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

contrast can be changed with the potentiometer. So no problem with hidden characters by bad contrast .

I tried 2 different displays. Both work fine under raspberry PI.

I tired it with an UNO R3 board and with a Mega 2560 board. Got no luck.

The result is always the same: first line has nothing, second line has only the blocks/ bars.

I'm using Arduino 1.8.3. Any additional information necessary?

Thx for your support.

Nudelsuppe

@Nudelsuppe

The result is always the same: first line has nothing, second line has only the blocks/ bars.

Your display is upside down, maybe you have your connections 'exactly wrong'.

Also, you haven't mentioned the R/W connection (LCD pin 5) in either of your pinout descriptions . . . .

I have exactly the same issue:

So do I. We can't really help without seeing your code and connections.

Don

Hey Don.

Checked couple times the complete wiring depending to the wiring in the comments... R/W is connected to GND.

code: I'm sorry. I thought it would be clear. I didn't change a single line of code from the examples.

Here it is (Original, unmodified Arduino sample code):

/*
LiquidCrystal Library - display() and noDisplay()

Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD and uses the
display() and noDisplay() functions to turn on and off
the display.

The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystalDisplay

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// Turn off the display:
lcd.noDisplay();
delay(500);
// Turn on the display:
lcd.display();
delay(500);
}

And here is the (unmodified) code from Elegoo:

//www.elegoo.com
//2016.12.9

/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:
* LCD RS pin to digital pin 7
* LCD Enable pin to digital pin 8
* LCD D4 pin to digital pin 9
* LCD D5 pin to digital pin 10
* LCD D6 pin to digital pin 11
* LCD D7 pin to digital pin 12
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello, World!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}

Nudelsuppe

That's half of what we need. Now we have to see a photo of your actual setup to see if you implemented the code properly and to evaluate your soldering.

Don

I'm so sorry. Too much newbie...

Here are some pictures of the breadboard wiring...

The Arduino sketch doesn't fit your wiring, so it can't be used without modifications.
The other sketch should be working, but as floresta suggests: check the display pin sequence.
What happens when you turn the potmeter?

I guess it's time for me to re-introduce my generic step-by-step approach.

(1) If the module has a backlight then get it working properly. This involves only pins 15 and 16 on most LCD modules. Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly. This involves only pins 1, 2, and 3 on most LCD modules. You should be able to just barely see blocks on one row of a two row display and on two rows of a four row display.

NOTE: The Arduino has not been used yet, except as a possible source for the power needed for the first two steps. Do not try to go any further until this is working. If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino. Make sure that your wiring matches the numbers in the descriptor (or vice versa).

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
  LiquidCrystal lcd( 7, 8,  9, 10, 11, 12);      // put your pin numbers here

(5) Upload your sketch and it should work.

For troubleshooting a 'static' sketch, one that displays a simple message or two and then stops is recommended. All of your code should be in setup(), and loop() should be empty between the brackets.

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
  LiquidCrystal lcd( 7, 8,  9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                              // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

Don

@ffur: I know that one sketch doesn't fit to the picture I posted. The picture I posted fits to the Elegoo example. I modified the wiring to pin 2, 3, 4, 5, 11 & 12 (depending to the wiring instruction in the comments of each program example).

When I turn the potentiometer the line closer to the soldering gets quicker dark than the other line. But bot lines change the contrast intensity...

I attached three different contrast settings when I turn the potentiometer. Background light is not connected...

And like I mentioned I have second (similar) display: same behavior and I tried also another Arduino board.

@Don: Backlight and contrast work the way you described. Even I think everything is the way you wrote step by step, I will do it again and confirm. The backlight in the photo I couldn't use a resistor to limit the current, it was to dark. The second display I tried, I used a 220 Ohms resistor.

Will get back with the confirmation....

On your particular display it is not essential that you use the backlight so don't worry about that part right now.

It looks as if you haven't removed the plastic protective film from your display, it will be clearer if you do.

Have you verified that your wires are good?

Don

Hi Don.

Now I got time to test again. Today a colleague tried his best as well and failed...

Now the big BUT: But after he gave me back my parts, I recognized my wires were very loose. I pushed them harder into the breadboard. I still went through your step by step. And... it worked. I rewired to the original Arduino example and it worked as well.

So my guess is that the loose wires caused connectivity problems. We checked also the wires with an oscilloscope and saw the data packages. So what, I'm happy now that I can start now my original quest :slight_smile:

Any good advises for better wiring and at the end to finalize/ to print a PCB?

Thanks to all, especially to you Don.

Nudelsuppe

Nudelsuppe:
Any good advises for better wiring and at the end to finalize/ to print a PCB?

I would switch to using a i2c backpack that is soldered to LCD
That will reduce the wire count (arduino pins) to only two instead of 6.
If you use my hd44780 library (which can be found in the IDE library manager)
it will also be faster than using the LiquidCrystal library with 6 pins and you can have full backlight control as well as some other features like automatic line wrapping.

--- bill

I had similar problem of showing the first line empty and the second line with blocks. I just used arduino nano pins 10, 9, 8, 7 instead of 5, 4, 3, 2. It worked fine but the display was upside down.

techiefellow:
I had similar problem of showing the first line empty and the second line with blocks. ... It worked fine but the display was upside down.

As pointed out in reply #4.

That's no problem, just stand on your head when you need to read it.

Don