Two HD44780 LCD's one works, the other doesnt..

So I have been working with some Hantronix HDM16216H-5 LCD's on a few of my projects using the 6wire half Byte mode and the included Arduino 18 LiquidCrystal library. I have two of these LCD's and have not had a problem with them.

I wanted a display with a back light so i ordered a few Hantronix HDM16216L-5 displays that have a yellow LED back light.

I assumed that because both displays are almost identical, pin compatible and use the HD44780 interface they would be easily swapped.

I got the displays soldered on some headers, swapped it into a breadboard and nothing.

I have tried switching to using full Byte communication and even the RW pin. I have swept the contrast input Vl from 0v to 5v. I have tried it with the back light wired in and not.

I don't get any quick flashes or random characters or boxes from the HDM16216L-5.

After reading some posts about the initialization problems with the older LCD libraries pre-Arduino 17, I switched to a HP bench supply and reset all power to the arduino board and LCD several times.

I have swapped in 4 of the HDM16216L-5 displays (none work) and two HDM16216H-5 displays (both work).

I am using the example sketch 'hello world' from liquidcrystal provided with Arduino 18.

I received the two HDM16216H-5 displays with some tekbot kits a few years ago. I ordered the HDM16216L-5 displays from mouser.

Is there some sort of initialization these displays need outside of the arduino liquidcrystal initialization when the displays are new?

HDM16216H-5

HDM16216L-5

Both Displays

Pics are too small to tell the connections. Check where your LCD pin 5 is going. Why did I see it go into one of the arduino pins? It's read/write, which can be tied to ground since you don't quite need to read but just write.

Did the back light turn on with the L-5 model?

sorry I only have the camera on my phone available to me right now.

The thing i was trying to illustrate with the pictures is that the wiring does not change between them, but the attached LCD does. So the wiring is correct as the devices are pin compatible.

I do have the read/write pin tied to the Arduino and defined in the LiquidCrystal declaration.

LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7) 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 10, 11, 9, 8, 7, 6, 5, 4, 3, 2);

The H-5 model does not need it to function properly and I have never used it before. I added it because the L-5 was not working in that configuration and not knowing how LiquidCrystal initialized the display I was not sure if it would help or not. I assume it cant hut. Same thing as writing a full Byte vs/ half Byte, right?

The LED back light does work if I connect it, the pins for the back light are isolated and don't effect the operation (or lack of for that matter)

Maybe try another one of those L-5 models? This one might be bad?

The thing i was trying to illustrate with the pictures is that the wiring does not change between them

i see in the pictures that the one that is working has 2 less pins connected, so since the non working one has those pins connected to "something" I have to argue that point

http://www.ladyada.net/learn/lcd/charlcd.html

Start with basic blocks. then move on to check your data and control lines.

from your post you did not have basic blocks.

A link to data sheets for each display may help as well.

I see no relevant differences in the datasheets - the L model seems to be backlit, the H not.

Here are some better pictures with them in the half Byte mode with the R/W pin tied to ground.

The same problem but you should be able to actually see the wiring this time.

Again I swept the contrast Vo pin from ground to +5 and reset the power to the arduino board and LCD several times.

HDM16216H-5


HDM16216L-5

Maybe try another one of those L-5 models? This one might be bad?

I have tried five of the L-5 model LCD's. I have 14 of them and I grabbed the five samples randomly from the bag.

I assume Hantronix has some sort of ATE on the line producing these so I don't think they could all be bad? Then again, I have no idea how often they take a sample.

i see in the pictures that the one that is working has 2 less pins connected, so since the non working one has those pins connected to "something" I have to argue that point

Yes the HDM16216H-5 has two extra pins; 15 (LED Anode) and 16 (LED Cathode).

The the first set of pictures you notice only the Cathode is connected to ground and the back light is off.

In this set of pictures I hooked the Anode to +5 to change things up a bit.

NOTE: Leaving both pins disconnected does not make a difference.

I see no relevant differences in the datasheets - the L model seems to be backlit, the H not.

Yes! its driving me crazy!....

HDM16216L-5 datasheet

HDM16216H-5 datasheet

Start with basic blocks. then move on to check your data and control lines.

from your post you did not have basic blocks.

Using untouched code from the example 'hello world'.

The data and control lines do not change between LCD's. If you look at the datasheets you see that the data and control lines are pin for pin identical. But one model works and the other doesn't.

/*
  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
 * 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 25 July 2009
 by David A. Mellis
 
 
 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 rows and columns: 
  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 may sound silly but are you sure that the pin 1 is pin 1, but not pin16? Both pin 1 and 16 are ground and both pin 2 and 15 are 5V. If you rotate the display and plug in again, both logic and back light are still powered but you don't get anything because the pot is simply not connected to pin 3. H sounds like High (pins above display area) and L sounds like Low (pins below display area). If you rotate your display and plug it back in (I guarantee it won't hurt it, hope you don't know my home address ;D). Try this and adjust the pot.

A most interesting idea... Both datasheets however show 1 at the corner and 16 in the middle....

rotate your display and plug it back in

interesting idea, as deSilva pointed out they pin numbering is supposed to be the same, i know pins 15 and 16 power the led back light, and the numbering is etched on the PCB. But it tried it none the less :slight_smile: and....

Drum roll....

Nothing, i did sweep the pot too...

I made a few other observations. I scoped out the data and control lines today while connected to both LCD's. All very square and 5v, I did notice that the high time of the enable line was glitching between something like 40us and 80us. Not sure why this is but it does occurs with both displays.

I also checked how both displays work with no data or control lines attached at all.

I connected only the Vss, Vdd, and Vl lines to both LCD's and swept Vl again. The H-5 model is all blacked out on the first line while the L-5 still shows nothing.

My point is that even when you hook these displays up wrong, as long as you have supplied power and Vl correctly they will show you something.... Mabe just garbage but something to confirm that its actually works.

I think i just got a really bad batch and the only way to fix this problem is throw more money at it :-(. Unfortunately because of how I got the LCD's it will probably cost more to return / exchange them that just buy more.

(1) The difference I spotted between the datasheets is, that the H version could need considerable more VL voltage than the L type.
When you use the USB, Vcc will be generally not 5 V bit 4.8 or so. Can you use a true 5 volt supply? connect VL directly to Vcc without the pot.

(2) Can you try to READ something from the displays? This would find whether the problem is the sceen or the controller...

(1) The difference I spotted between the datasheets is, that the H version could need considerable more VL voltage than the L type.
When you use the USB, Vcc will be generally not 5 V bit 4.8 or so. Can you use a true 5 volt supply? connect VL directly to Vcc without the pot.

I read another forum post earlier that described problems these LCD's were having with previous verisons of the LiquidCrystal library (pre arduino 17), where the 5V rail would not come up fast enough and the LCD would not initialize properly.

Because of this I have been using a pretty heavy duty HP E3631A power supply on this thing all along so there should be no doubt the 5V is solid.

(2) Can you try to READ something from the displays? This would find whether the problem is the sceen or the controller.

..

I like this idea, and I am going to have to give it a try when I get some time this weekend.

I have been thinking all along the only way I can truly determine if the controller is functioning as it should is write my own code for a basic conversation with the device or just put a LA on it and watch.

Both somewhat time consuming and im pretty tight on that right now :frowning: but hopefully i can make some this weekend.

Thanks for all the input guys!

It is possible that your "inoperative" LCD is an extended temperature version. In that case you might need a negative voltage on pin 3.

Don

Wow - I totally misread the datasheet, it says:
"Vdd-VL between 4.2 and 5.3 volts" not "VL between 4.2 and 5.3 volts".
So VL should be between +0.8 and -0.3.

I should have been aware of this, as when I used similar displays long, long ago they worked fine with this pin just connected to ground... I think..