1602A 16x2 LCD with Mega displaying only blocks on top row

Hey all,

My 1602A 16x2 LCD screen (which uses the Hitachi HD44780 driver) used to work fine. I use a Mega 2560, as well as an UNO. When I plug it in, wired up as per the tutorial (http://arduino.cc/en/Tutorial/LiquidCrystalSerial), I only get blocks displaying on the top line and nothing on the second. I'm using the tutorials setup purely for debugging purposes.

I soldered a row of header pins onto the board, and have successfully tested the connections via continuity test. (Tested between the top of the pins on the board to the end of the wire going into the Arduino). Every connection used is sound, and my backlight is disconnected (but it works when plugged in).

With this simple code, the blocks will change in brightness every 500ms, but not display any text.

Picture 1: Showing the wiring (sorry if unclear) (Click for full size)

Picture 2: Showing the soldering (Click for full size)

Code: Taken from the tut, with the ports changed to match my wiring
I know my RS and E are on 2 and 3, my code has been updated accordingly

#include <LiquidCrystal.h>
LiquidCrystal lcd(2,3, 6,7,8,9); //(RS,E,D4,D5,D6,D7)
/*Initialize LCD Screen
VSS  =GND
VDD  =5V
VO   =Pot Wiper
RS   =12
RW   =GND
E    =11
D4   =6
D5   =7
D6   =8
D7   =9
*/
void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 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);
}

Can anyone see what I've done wrong, or what I should do next?

EDIT:
I have read all the related posts I could find, none of the solutions have worked thus far

Is the contrast pot working (1st photo , right side) ?
Do you have the contrast pin adjusted for 0.4V dc ?

raschemmel:
Is the contrast pot working (1st photo , right side) ?
Do you have the contrast pin adjusted for 0.4V dc ?

I have the contrast pot working fine. It's a bit dim at the moment because I had been using it before I took the picture. I've varied the contrast level, tried two different 10k pots and a 330R resistor (saw a comment somewhere to try that. Very high contrast).

Move the "hello world " code to the main loop and try that.

#include <LiquidCrystal.h>
LiquidCrystal lcd(2,3, 6,7,8,9); //(RS,E,D4,D5,D6,D7)
/*Initialize LCD Screen
VSS  =GND
VDD  =5V
VO   =Pot Wiper
RS   =12
RW   =GND
E    =11
D4   =6
D5   =7
D6   =8
D7   =9
*/
void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.clear(); // Clear the screen

}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(1000);
   // Turn on the display:
  lcd.display();
  
// Print a message to the LCD.
  lcd.print("hello, world!");
delay(5000);
}

Thanks. I tried that, didn't help. Sending the command just once should have the same response.

When you have blocks only on the top row of a two row display it means that the display has not been properly initialized. This can be due to improper wiring and/or a bad program.

When troubleshooting an LCD problem like this you should remove as much code as possible, especially any code that causes changes to the display. Generally this means that all the code should be in setup() and there should be nothing between the brackets in loop().

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

Don

Thank you for the advice, mighty Don, overseer of all 1602A threads (seriously, whoever makes the screens should pay you for tech support).

I have tried the sketch on my Uno and Mega, still same results. Maybe I should just get a new screen and start over?

... seriously, whoever makes the screens should pay you for tech support

I asked Newhaven Display to send me a sample since their devices are somewhat different from the norm. They declined.

It looks like you may have some 'cold' solder joints on your LCD module. You should rework all of those joints and see if that helps. Check out this information from Adafruit --> Common Soldering Problems | Adafruit Guide To Excellent Soldering | Adafruit Learning System

Don

floresta:
It looks like you may have some 'cold' solder joints on your LCD module. You should rework all of those joints and see if that helps. Check out this information from Adafruit --> Common Soldering Problems | Adafruit Guide To Excellent Soldering | Adafruit Learning System

Don

Thank you! I know the board may have had some dust on it before soldering, so I'll get cracking! I did do a continuity test, but I'm not 100% on the integrity of the signal.

Either way, thank you so much for the link, it will help my soldering no end.

Thanks! Had the exact same problem and a continuity test picked up a dud hook up cable on the enable pin.

Also re-soldered my header strip with the tips from adafruit. Looks much better!

Cheers,
Fin

finsarg:
Thanks! Had the exact same problem and a continuity test picked up a dud hook up cable on the enable pin.

And - I must have missed that post back in August because my advice is always to check those dodgy Chinese jumper wires. :astonished:

The other comment - along the lines of floresta, is always to start by connecting the backlight if it is present. This does two extremely important things. It verifies that some voltage is present on your breadboard, and it means you can actually and clearly see the display.

Paul__B:
And - I must have missed that post back in August because my advice is always to check those dodgy Chinese jumper wires. :astonished:

Yes caught me out too spent hours scratching head and trying "code"...just one "dodgy wire" to D6 on the LCD
and no text displayed at all !!!!!