Pages: [1] 2   Go Down
Author Topic: 16x2 LCD shows only black boxes in the bottom line  (Read 8508 times)
0 Members and 1 Guest are viewing this topic.
New Delhi,India
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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


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

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

Quote
... and is it this which is causing the problem?
No.  It's something else.

Don
« Last Edit: September 17, 2012, 01:00:38 pm by floresta » Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 (72.88 KB, 640x480 - viewed 260 times.)
« Last Edit: September 20, 2012, 07:25:10 am by dragonwarrior » Logged

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

Quote
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 

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7189
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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: LiquidCrystal lcd (7.8.9.10.11.12);
Now it should work fine!
Logged

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

Quote
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:

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

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7189
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

gmcelhanon,

Thanks for sharing.

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


New Delhi,India
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Don
Logged

Pages: [1] 2   Go Up
Jump to: