16x2 LCD shows only black boxes in the bottom line

hey,i got a new lcd and wanted to test it out before actually uploading any program,and i did that with the hello world program,and the output was just black boxes in the bottom line , with the top line being blank. The connections from the lcd to arduino are the regular ones,except V0,as i connected it to GND. Can someone please explain to me how important contrast is and is it this which is causing the problem?...because the connections are all fine,and arduino is fine too.

... and the output was just black boxes in the bottom line , with the top line being blank.

Well for starters you have the LCD module upside down.

Perhaps if you told us more about which module you are using we could be of more help.

The connections from the lcd to arduino are the regular ones...

There's no such thing. You can use any I/O pin of the Arduino for any of the LCD connections.

...except V0,as i connected it to GND.

If this is pin 3 then you should be OK. Although the display will not be optimal you should be able to see something, and you are --- the black boxes.

... and is it this which is causing the problem?

No. It's something else.

Don

V0 is the Contrast pin... it literally sets the contrast of the display and in this case is your issue. You will need at a minimum a 4K7 resistor from 5V to V0 and a 330R from V0 to ground (Courtesy of PH Anderson) I borrowed those values from an LCD "Serial Backpack" by PH Anderson. The values work on most LCD display devices that use the HD44870 IC or it's equivalent for LCD control. The Best thing to do is use a 5K pot: CW or one end to ground, Wiper or center lead to V0 and CCW or the other end to 5V.The resistors will get you going and the pot will give you control of the contrast.

Doc

... and in this case is your issue.

No it's not. He is seeing a single row of boxes which means that the display is getting power and that his contrast voltage is adequate (but probably not optimum). If the contrast voltage were too high (compared to GND) the display would be blank and if too low there would be some dimmer boxes in the other row.

His controller is not being properly initialized which is due to a wiring or programming error.

Don

Hi everyone. I am new to this arduino programming.
I do have the same problem with interfacing LCD to my arduino.

I use JHD162A LCD . I have thoroughly checked the wiring and connections .
what i see is a blank line in the first row followed by square boxes in the next row when i uploaded the "Hello world "program from the arduino library.

I have connected a 5K pot to pin 3 of the lcd and i am able to adjust the contrast of the lcd as well ( that means the contrast gets changed for the second row only ) .

where did i mistake and please correct me.

Any help will be appreciated…
Thanks in advance.

Lcd_0.jpg

what i see is a blank line in the first row followed by square boxes in the next row ...

Then your LCD module is upside down as well.

You posted a drawing of an LCD module. If the pins really are below and to the left of the display then the pinout is usually different that the one that you have depicted. We have to get this part straightened out first.

Don

The pin numbers are given at the back of the LCD. i have given the connections based on that ,so i think there is no problem with the connections.

...so i think there is no problem with the connections.

Well there is a problem somewhere. It would help if you could provide a photograph that clearly and unambiguously shows the connections between your LCD and your Arduino.

Don

Make sure you supply a couple of pictures of your actual connection. A lot can happen between theory and practice, or thinking and doing. I wager more than 50% problems presented on this display sub-forum is a proof. The more information you provide, the sooner you get your help.

It seems there are few problems in the earlier version of the arduino lcd library. I saw the changes made and wired my lcd as per the latest (updated) lcd library and it works fine..

You need to get the black square boxes in the lcd before connecting the pins RS,EN,RW and the four data pins to the arduino.Once you got that, All you need to do is to initailise your LCD pins by cheking the line : LIquidCrystal lcd (......) in your code.. Make sure that RS goes to pin 7 of arduino,EN goes to pin 8, and the four data pins (14,13,12,11) of the LCD goes to pins 12,11,10,9 of your arduino. So it should be: [u]LiquidCrystal lcd (7.8.9.10.11.12);[/u] Now it should work fine!

Make sure that RS goes to pin 7 of arduino,EN goes to pin 8, and the four data pins (14,13,12,11) of the LCD goes to pins 12,11,10,9 of your arduino. So it should be: LiquidCrystal lcd (7.8.9.10.11.12); Now it should work fine!

You are missing the entire point of the numbers inside the parentheses - but it is not entirely your fault since the documentation is elusive.

You can use any available I/O pin on your Arduino for any of the LCD lines. All you have to do is express them, in a specific order, within the parentheses. Here is how I recommend commenting the example sketch:

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

Here's how you find the documentation:

Start here: http://arduino.cc/en/Tutorial/LiquidCrystal
Scroll down to the bottom
Use the Liquid Crystal Library link to get here: http://arduino.cc/en/Reference/LiquidCrystal
Use the LiquidCrystal() link to get here: http://arduino.cc/en/Reference/LiquidCrystalConstructor
And there it is under 'Syntax'

Simple, isn't it?

Don

I had the same problem, and after very carefully checking all my connections and the library, I decided to go back and touch up my soldering. Once I did that and tried it again, it finally worked. So if the LCD isn't getting initialized, and you're just seeing the black boxes... and I did the soldering... then double check the soldering.

gmcelhanon,

Thanks for sharing.

On the other hand, the OP has left the thread for 2 weeks. I recommend Admin to lock this thread.

Thanks a lot guys,i installed the new library,checked the connections again,and changed the program to what was given here,and it worked. thanks a lot. :)

Did you also turn it over or are you standing on your head?

Don

nothing happened when i turned it over before...it was still the same.

nothing happened when i turned it over before...it was still the same.

No it was not the same, unless you have a very unusual display.

Don

i know this topic is closed but many of will coming here with the same problem i was facing this problem too and just find out why it was. one thing is very clear that you are watching lcd up side down as i was doing too. and second thing that led is not being communicated. in my case i didn't conected the r/w to ground by connecting its working properly

in my case i didn't conected the r/w to ground by connecting its working properly

You obviously have looked at some old threads but you haven't gone back far enough. The problem of not connecting the R/W line was quite prevalent several years ago but has only shown up one or twice in the past few years. The connection is clearly shown in the diagram with the tutorial (http://arduino.cc/en/Tutorial/LiquidCrystal) and is also mentioned in the program comments.

Don

hello, i know the topic is old but i have a strange problem.
I conect my LCD like this
http://fritzing.org/media/fritzing-repo/projects/h/how-to-connect-a-qy-1602a-lcd-to-arduino-correctly/images/conectar%20un%20lcd%20qy-1602%20a%20un%20arduino%20uno%20r3_bb.png
And when I conect my USB cable and upload sketch the LCD works, but when I unplug the USB then plug it again it just show the first black row. When I upload sketch it work again

/*
LiquidCrystal Library - display() and noDisplay()

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 uses the
display() and noDisplay() functions to turn on and off
the display.

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
  • LCD R/W pin to ground
  • 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 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(11, 12, 7, 6, 5, 4);

void setup() {

// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
// Turn off the display:
lcd.setCursor(5,0);
lcd.print(“HONDA”);
lcd.setCursor(4,1);
lcd.print(“CRM 180”);
delay(2000);
lcd.clear();
lcd.print(“H:xxxx.x”);
lcd.setCursor(0,1);
lcd.print(“km:xxxxx”);
// Print a message to the LCD.

}

void loop() {
// Print a message to the LCD.

}

I use arduino nano clone 328