[Solved] 8*2 LCD Setup with Arduino?

Hi Guys,

I must admit, I’ve put this off for a while now. I’ve had this LCD for many months sitting in a draw after I failed to get it up and running.

First up, what am I talking about? seeedstudio.com/depot/lcd-82 … p-120.html

I’ve tried setting this per the provided examle and no joy. I’ve tried using alternate libraries including “LCD4Bit” (which I use on my other LCDs). In a vain attempt to minimise any other potential issues (like dodgy connections)

I’ve connected it directly to an Arduino Mega

(Sorry about the piss poor images, I’ve yet to join the 21st cent yet :s)

I tried hooking up a POT to double check whether the text was simply unreadable - no difference sadly.

#include <LiquidCrystal.h>

// LiquidCrystal display with:
// rs on pin 12
// rw on pin 11
// enable on pin 10
// d4, d5, d6, d7 on pins 5, 4, 3, 2
LiquidCrystal lcd(51, 48, 49, 46, 47, 44, 45, 42,43,40,41);

void setup()
{


  // VSS/VDD 
  // Pin 1 [VSS]
  pinMode(52, OUTPUT);
  digitalWrite(52,LOW);

  // Pin 2 [Vdd]
  pinMode(53, OUTPUT);
  digitalWrite(53,HIGH);  

  // Pin 3 [Vo] Driving voltage
  pinMode(50, INPUT);
  digitalWrite(50,LOW);  


  // Backlight
  // Pin 38 aka LCD pin 16 LEDK
  pinMode(38, OUTPUT);
  digitalWrite(38,LOW);

  // Pin 39 aka LCD pin 16 LEDK
  pinMode(39, OUTPUT);
  digitalWrite(39,HIGH);    

  // LCD Pin 1 [Vss] =     Arduino 53
  // LCD Pin 2 [Vdd] =     Arduino 52
  // LCD Pin 3 [Vo] =      Arduino 50

  // LCD Pin 4 [Rs ] =     Arduino 51
  // LCD Pin 5 [RW] =      Arduino 48
  // LCD Pin 6 [Enable] =  Arduino 49

  // LCD Pin 7 [DBO] =     Arduino 46
  // LCD Pin 8 [DB1] =     Arduino 47
  // LCD Pin 9 [DB2] =     Arduino 44
  // LCD Pin 10 [DB3] =     Arduino 45

  // LCD Pin 11 [DB4] =     Arduino 42
  // LCD Pin 12 [DB5] =     Arduino 43
  // LCD Pin 13 [DB6] =     Arduino 40
  // LCD Pin 14 [DB7] =     Arduino 41

  // LCD Pin 15 [LEDA] =     Arduino 38
  // LCD Pin 15 [LEDB] =     Arduino 39

}

void loop()
{
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

Has anyone had any joy with these devices since I’ve posted… I’d love to get mine going

I finally managed to get this to work. The LiquidCrystal library is a no go. You need to use the LCD4Bit library.

Here’s a copy for those who get stuck and can’t get any help: milesburton.com/downloads/Arduino/LCD4Bit.zip

Glad to see it is resolved.We should have helped much earlier, the post has stayed for quite a few months…Sorry

I do have a similar problem.
If the board is hooked up like in the example above (Pin1 = GND, Pin2 = VCC, Pin3 = GND, as opposed to the suggestion on the product page, which suggests to hookup pin2 to GND and pin1 to VCC) I get the first row working but the second row does no display anyghing. Even with no data transmitted to the display, the first row is fully dark (or white) while the second row shows nothing.
If all the data channels are connected, I can transmit text to the first row but the second still stays blank. I tried this on two different displays of this type and both show the same problem.
Any suggestions? Are they just broken?

Ok, I’m back and I have the solution in my bag.
This display actually works very well with the standard Arduino LCD library. No need to download the above mentioned additional 4bit library.
It is true though that you have to use this display in 4-bit mode.
Here is how:
Hook everything up EXACTLY like in this picture from the Arduino page:

Now load the “Scroll” Example from Arduinos LiquidCrystal Library.
Change these two lines

lcd.begin(16, 2);
lcd.setCursor(0,7);

to

lcd.begin(8, 2);
lcd.setCursor(0,0);

now upload it to your Arduino or Seeduino and watch your display fire up!
You may have to adjust the potentiometer a little if you can’t see anything.

As an alternative to the potentiometer you can connect the Vo pin of the LCD with any available PWM-output (I use pin 9) and add the following code in the setup() section:

pinMode(9, OUTPUT);
analogWrite(9, CONTRAST);

replace CONTRAST with the value of your choice. Values around 10-20 give a nice bright output.

@ESP:
please add this information to the depot-page of the display and update the picture shown there because pin1 and pin2 have to be swapped and pin3 must not be connected to GND or you have a contrast of 0.

Modified, thanks! :slight_smile:

Hello,

I’m resuming this post becouse i bought an LCD 16x2 LMB162ABC and I’m unable to run it in Arduino 21 (no data displayed).

Here’s the code:

[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
  • 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 8 Feb 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(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(8, 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);
}[/code]

Onky the blinking display is working (from noDisplay() to display() ).
Ithink I’ve done a good work with solder and wires are correct, same as http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

Thanks in advance!

Marco