16 Char LCD module

Hi all,

This is probably a long shot, but I thought I should try anyway!

I just purchased an old (cheap) 16 character LCD module that I want to use with my Arduino board. The problem is, no documentation! I've searched all over Google & can't seem to find anything on this display.

Here are the details: On the front there is a sticker with 123S00254 On the back there is a sticker with LM575 The two driver chips are HD44100H (I think the driver chip) and HD44780A46 (I think the controller)

If anyone knows anything about htis display, I'd be extremely grateful fo any shread of knowledge on it!

If I can get the specs on the controller chip, I can at least ohm out the connections ot the 14 pin header.

The HD44780 controller is very common and is supported by the LCD library for Arduino.

EDIT: rubbish deleted :-)

Thanks for the info! :smiley:

I did find some info on the HD44780U controller but was concernedthat there might be pin differences between that one and mine.

Oh well, I guss I’ll just have to give it a try & hope I don’t let the magic smoke out of the thing! ;D

I hooked up my LCD and used the LiquidCrystal library to do a simple "Hello World" program, but I don't see anything on the display. [smiley=cry.gif]

Any suggestions for how to proceed to troubleshoot this?


Have you connected a potentiometer between 5V and ground, and connected the wiper to the LCD's contrast input pin? Most LCD schematics show this. The LCD won't work without it! Beware that some (older) LCDs needed a negative contrast power supply.

Hmmmmm, I didn’t seem to see anything that looked to be a contrast pin on the datasheet for the controller.

However, there was one pin that I was not able to determine the function. It’s called V5 and it’s labeled as “power supply for LCD drive.” When I checked that pin (I didn’t connect it) it had +5V on it.

I found some documentation on how the contrast is supposed to work.

I don’t have the appropriate trim pot (10k - 20k) so I just used a bunch of resistors in series and moved the V5 line around. It turns out that shorting it directly to ground produced some visibilty on the display. So, it would seem that my display might need negative voltage on that pin.

Moving on, my sketch did not produce any output on the display. It just stayrd in a state with all of the pixels in an on state. Could not having a negative voltage for V5 be causing this?

If not what other things should I watch out for?

The voltage is unlikely to be negative. +0.7 volts or so is typical, although it does vary with LCD type. Your best bet is to try it with a pot. You can often find them in discarded computer components. I think I got 3 or 4 10k preset pots from an old CD drive that was being thrown away. Old printers are another potential source.

Good luck!

I was using the lcd4bit library successfully previously and now that I tried to switch to the liquidcrystal library, I get the same result with my newhaven 2x16lcd.. the top line is lit solid and no display. when I re-load my old sketch the display resumes working.

I suspect there is a bug in the init of the lcd in this library... it would be nice to get it to work, as it is 1k less code and appears to handle printing better.

As for the contrast pin, most lcd set to between 2-3vdc... easiest way is a 10k wiper. adjust the voltage based on temperature..

If LCD4bit is working and LiquidCrystal is not then that sounds like a problem with LiquidCrystal. Double check to make sure the sketch is using the correct pins, but if so it could be either the initialization or the timings for writing data and pulsing the enable pin. I wonder if you feel up to experimenting with the LiquidCrystal library by putting in delays so its similar to those used by LiquidCrystal.

Also remember that many 16 char one line LCD's has to be set up as 2 lines of 8 chars.

When I hook an LED up to the enable pin.. it only blinks once.. even if I have a loop sending messages to the LCD every second.. I even switched to a 2x8 optrex lcd I used when I first started using lcd.. like before, it works in lcd4bit but not liquidcrystal. I know the pins are correct and I even tried swapping the order of pins around physically and in code

When I compare lcd4bit to liquidcrystal they look quite different.. even adding some delay or delaymicrosecond doesn't seem to help. I did delete the .o file before re-sending the sketch.

The upgrade notes for arduino.0012 says something about combining the print libraries... I don't understand how that relates..what it means or how it works.. the lcd4bit library has print command handler in it the liquidcrystal doesn't.. could this be a problem? the example sketch for liquidcrystal shows lcd.print("Hello world!");

I don't think the print class is causing the problem. You can verify this by adding some Serial,print statements in your sketch and seeing if that is ok – Serial and LiquidCrystal share exactly the same print code.

Perhaps ask someone else to check the wiring, it can be surprisingly easy to miss a problem.

Because LiquidCrystal has worked for many people (I use it on a couple of different display panels), if it's not the wiring it could be the timing not quite right for the display panel you are using.

When I hook an LED up to the enable pin

The pulses on the Enable line are very short, only a few microseconds. You'll need to use a logic probe with a pulse stretching or pulse capture facility to see them.

".. the top line is lit solid and no display"

I'm getting the same as dnear1.

I've got the contrast right using a trimmer pot so I am not missing any text that would display.

The display uses a "KS0066 LSI controller"

Both of my lcd are hd44780-compliant and both work identically with lcd4bit.

I have tried reversing the DB pins and swapping rs and enb between the 3 selected pins to no effect. I even pinned out directly like the liquidcrystal helloworld sketch without mods to no effect…

Here is the pinout for my 8x2 (My 16x2 has 2 extra pins for backlight)

1 VSS [ch65293] Power Supply (0V, GND)
2 VDD [ch65293] Power Supply for Logic
3 V0 [ch65293] Power Supply for LCD Drive
4 RS H / L Register Select Signal
5 R/W H / L Read/Write Select Signal H : Read L : Write
6 E H / L Enable Signal (No pull- up Resister)
7 DB0 H / L Data Bus Line / Non- connection at 4- bit operation
8 DB1 H / L Data Bus Line / Non- connection at 4- bit operation
9 DB2 H / L Data Bus Line / Non- connection at 4- bit operation
10 DB3 H / L Data Bus Line / Non- connection at 4- bit operation
11 DB4 H / L Data Bus Line
12 DB5 H / L Data Bus Line
13 DB6 H / L Data Bus Line
14 DB7 H / L Data Bus Line

I have db0-3 tied to ground
enb on 3
rs on 9
rw tied to GND
Contrast on 10k pot dialed to optimal viewing when using lcd4bit

my liquidcrystal sketch:

#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(12, 11, 10, 5, 4, 3, 2);
LiquidCrystal lcd(9, 8, 3, 4, 5, 6, 7);

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

void loop()
  lcd.print("hello, world!");

my lcd4bit sketch:

//example use of LCD4Bit library

#include <LCD4Bit.h> 
//create object to control an LCD.  
//number of lines in display=1
LCD4Bit lcd = LCD4Bit(1); 

//some messages to display on the LCD
char msgs[6][15] = {"apple", "banana", "pineapple", "mango", "watermelon", "pear"};
int NUM_MSGS = 6;

void setup() { 
  pinMode(13, OUTPUT);  //we'll use the debug LED to output a heartbeat

  //optionally, now set up our application-specific display settings, overriding whatever the lcd did in lcd.init()
  //lcd.commandWrite(0x0F);//cursor on, display on, blink on.  (nasty!)

void loop() {  
  digitalWrite(13, HIGH);  //light the debug LED

  //pick a random message from the array
  int pick = random(NUM_MSGS);
  char* msg = msgs[pick];
  digitalWrite(13, LOW);
  //print some dots individually
  for (int i=0; i<3; i++){
  //print something on the display's second line. 
  //uncomment this if your display HAS two lines!
  lcd.cursorTo(2, 0);  //line=2, x=0.
  lcd.printIn("Score: 6/7");
  //scroll entire display 20 chars to left, delaying 50ms each inc
  lcd.leftScroll(20, 50);

Scrap from my LCD4bit library:

//RS, RW and Enable can be set to whatever you like
int RS = 9;
int RW = 8;
int Enable = 3;
//DB should be an unseparated group of pins  - because of lazy coding in pushNibble()
int DB[] = {4, 5, 6, 7};  //wire these to DB4~7 on LCD.

I bought a brandless 2x20 LCD with no marking on the PCB. My setup is the same as dnear1 except I'm using output from 9, 10, 11, 12 of the arduino connected to DB4-7. A 10k pot is connected with the centre connected to pin 3 of the LCD. So far only tried using LCD4bit.

I only have the back light on but no pixel come on.

Anything I can try to solve this?

I looked at the datasheet for the hd44780 on Sparkfun's website..

It looks like maybe LiquidCrystal doesn't init the LCD correctly compared to lcd4bit..

I will post my mods if I can get it to work correctly..

I can't seem to get any output either. I am using the LCD4bit library on build 13. Should I try with a pre-12 build maybe? And yes, I have good contrast, everything is wired correctly and the R/W pin is grounded.

Brought my arduino and went back to the shop to purchase a 2x16 LCD. Fix up the new LCD to the ardino and ran the LiquidCrystal example. This time, it works! Followed the example code and tie RW to one of the pins on arduino (pin 11 or something).

Will try using LCD4bit again tonight.

Strange thing is, even a new piece of 2x20 LCD didn't work while i'm at the shop. Don't know what's wrong.