I tried to use the LiquidCrystal sample with a JHD162 (which looks fairly compatible w/ Hitachi's one). However, I get a blank line and another one fully filled. Here is a link to my board and its output:
Not sure from the picture, but it doesen't look like you are using the same pinout as the example liquid crystal sketch. Make sure you wiring matches the code.
Just got my Arduino, and ordered a displaytech 162 LCD with it as well. Looks similar to the one on the picture (http://www.turtlecreations.nl/index.php?id=lcdblw).
I connected to following LCD pins:
I run the example LCD Hello world sketch from the arduino program, but all I got are the 16 blocks as in the picture on the first posting. Turning the potmeter doesn't show any characters. I also run a dummy program and I got the same results.
What am I doing wrong? Is this LCD maybe not suitable, or should it be used with the 8 pin connection, instead of the 4 pins? Is the LCD broken?
Any help would be appreciated.
========== #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);
void setup()
{
// Print a message to the LCD.
lcd.print("hello, world!");
}
The LiquidCrystal library relies on an LCD initialization technique that works on many, but not all LCD modules. I have written a fairly comprehensive review of the problem, and also a solution, which you can find at http://web.alfredstate.edu/weimandn . Follow the link to LiquidCrystal library.
Thanks,
I'll give it a try, been trying all night to get it to work, but no result.
Backlight died unfortunatly. Read afterwards that it take 3.3V, not the 5V I gave it. Wonder if I should have added a resistor as well, as is needed for normal leds.
I assume the backlight itself doesn't have anything to do with the problem mentioned above. I use a torch to look for characters.
Any change to fix the backlight, or buy a new one?
I had similar issues. Have you tried cycling the power to your lcd and reseting your arduino. This actually got me past a sticking point when working on mine. Also, just to clarify you do have the contract pin connected to the wiper on the pot? Using the LiquidCrystal library, I have made it a habit to do a lcd.clear() in my setup. I am still quite novice but these are a few things that helped me.
I've run head on into this problem and i cant figure out a solution. All pin connections have been thoroughly checked and I'm using the latest LCD library. Still nothing but the 16 blocks... I didn't realize arduino would take this much of my sanity this fast :-/
I've always been a fan of simple. Just a stab in the dark, what if you just ground pin 5 on the panel and change the LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); to LiquidCrystal lcd(12, 11, 5, 4, 3, 2); Its what I use on mine - admittedly not a JHD162 but a non descript I found on ebay. I followed this I found and it works :
It uses the LCD4bit library but it also works fine with the standard LiquidCrystal library (one you've changed the code to suit, it uses completely different calls to achieve the same thing). The demo sketch with the above link works, even if it is just advertising his site. Easier to work from a position of success rather than failure.