Help needed with 16x2 LCD Displaytech 162A

Hi,

I try to get a 16x2 Displaytech 162A LCD running with my Arduino Uno using the LiquidCrystal library
using Arduino 1.0.3.
I googled around, but am not sure about the wiring.
When I turn my Arduino on, the LCD backlight is on (green)and on one line i see dark blocks, the second line is empty.
Wiring information is included in the code.

Am I missing something important?

// LCD Pin -> Arduino Pin
// 1 -> GND
// 2 -> 5V
// 3 -> GND
// 4 -> 12
// 5 -> 11
// 6 -> 10
// 11 -> 5
// 12 -> 4
// 13 -> 3
// 14 -> 2
// 15 -> 5V
// 16 -> GND

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis()/1000);
}
  1. Have you connected a contrast potentiometer?

  2. Try with an empty loop() function, concentrate on getting hello world to display. Alternatively, add a delay(1000) call in loop so that you are not constantly rewriting new data to the lcd.

  1. I just added one (on Pin 14) and can now vary the contrast of the black blocks, but no hello world is showing.
  2. Removed it, just using the setup() now, but no changes.

Hi durpex,
I don't have the spec for the LCD here but something does look odd. You have pin 6 on the LCD connected to pin 10 on the arduino, but no where in the code are doing anything with pin 10.
(?)

  • Totoro

Hi again,
Yeah, it looks like you should be calling the lcd constructor with LCD pins 4,6,11,12,13,14 or for your assignments arduino pins 12,10,5,4,3,2. And I think the LCD pin 5 needs to be tied low.
-Totoro

Yeah, it looks like you should be calling the lcd constructor with LCD pins 4,6,11,12,13,14 or for your assignments arduino pins 12,10,5,4,3,2. And I think the LCD pin 5 needs to be tied low.

This is close but not exactly correct.

You have seven connections between your Arduino I/O pins and the LCD module so you need seven entries in the constructor.

// 4 -> 12
// 5 -> 11
// 6 -> 10
// 11 -> 5
// 12 -> 4
// 13 -> 3
// 14 -> 2

Therefore you need LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

OR

Connect pin 5 of the LCD to GND and use LiquidCrystal lcd(12, 10, 5, 4, 3, 2);

Don