Pages: [1]   Go Down
Author Topic: 1602A 16x2 LCD with Mega displaying only blocks on top row  (Read 324 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Code:
#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
« Last Edit: August 28, 2014, 06:36:06 am by Suff0c8r » Logged

Offline Offline
Faraday Member
**
Karma: 100
Posts: 6055
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Offline Offline
Faraday Member
**
Karma: 100
Posts: 6055
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
#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);
}
  


« Last Edit: August 28, 2014, 12:11:16 pm by raschemmel » Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 4401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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().


Code:
#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
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 4401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
... 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 --> https://learn.adafruit.com/adafruit-guide-excellent-soldering/common-problems

Don
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 --> https://learn.adafruit.com/adafruit-guide-excellent-soldering/common-problems

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.
Logged

Pages: [1]   Go Up
Jump to: