11

Recently I have linked up a typical 16*2 LCD (Liquid Crystal Display) display to my Arduino Uno and have linked all the pins up.

Here is my connection:(LCD pin first)

1=GND, 2=+5v, 4=11, 6=12, 11=5, 12=4, 12=3, 14=2, 15=backlight positive, 16=backlight negative

#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() {
  // 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);
}

This is the code that is the default for the LCD, I didn't write it.

So I have done all this and when I turn it on the screen is blank and nothing is happening. Could anyone explain what I have done wrong?

Greenonline
  • 3,152
  • 7
  • 36
  • 48
Stratmoss
  • 137
  • 1
  • 2
  • 6

3 Answers3

8

Recently I also faced similar problem, with connection as:

1=GND, 2=+5v, 4=11, 6=12, 11=5, 12=4, 12=3, 14=2, 15=backlight positive, 16=backlight negative

Solution: I just connected VEE (pin 3) of LCD to Ground (GND) without use of potentiometer as it worked.

Suraj
  • 81
  • 1
  • 1
7

Check out this tutorial on Adafruit. It will walk you through setting it up. In the tutorial they change the pins, which I believe is the issue here. Here is a snippet.

Fritzing Diagram

And change your pins:

LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
PhillyNJ
  • 1,178
  • 3
  • 10
  • 20
3

What is connected to LCD pin 3? Pin 3 is the contrast V0 and needs to be connected with a 10 KOhm potentiometer.

Some LCD's need a negative contrast voltage, check the datasheet of the display.

If the contrast voltage is not correct the display will stay blank. I came across the same problem until i saw the negative voltage must be applied :-)

RSM
  • 1,457
  • 1
  • 11
  • 26
PE1DLG
  • 39
  • 2