LCD 1602 blank display

Hi,

I'm a newbie in arduino stuff, and i'm trying to connect and display on a lcd 1602, but display is blank.
Code used is a simple Hello World.

Any help?
What am i doing wrong?

Code is:

"/*
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 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
  • 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
modified 7 Nov 2016
by Arturo Guadalupi

This example code is in the public domain.

*/

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

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

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);
}
"

If you look at the red and blue lines on your breadboard you will notice that there is a gap in each line near the number '30'.

There is a corresponding gap in the horizontal buss bars next to those lines. You will have to bridge those gaps with jumper wires.

Don

Many thanks for you help, i didn't now about these gap on breadboard power lines.... like i said, i'me really newbie :slight_smile:

Well but now i have the famous squares on LCD, and even when i adjust the variable resistance no message appears...

I tried the posted code with my Uno and a 1602 display and it works fine. It displays "hello, world" on the top line and the millis() count on the bottom line. Carefully check your wiring. Is the RW pin of the LCD (LCD pin 5) connected to ground?

I remade the links several times, but the result is always the same. I tested it with another display and the result is also the same ....

Is the RW pin of the LCD (LCD pin 5) connected to ground?

??

Sorry groudFungus, yes, its connected!

I really don't know what to say. The code works for me. The only thing that I can think of is that the Liquidcrystal library that you have installed is not right for the code that you posted. There are several libraries with the same name and that can cause problems as they are not all the same syntax wise.

I use the hd44780 library for all of my LCDs. It has a class for 4 bit parallel LCDs.

Install the hd44780 library. The hd44780 library is the best available for I2C LCDs. The library is available in the Library Manager. Go to Library Manager (in the IDE, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.

The class for your display is the hd44780_pinIO class. There is example code with the library for that class to get you started.

groundFungus, it worked!!!!

Thank you for your help!!!

If you don't mind, what did you do? That may be useful for future members who find this post.

I've changed to the library that you refer, changed pins as library and uploaded code again!