Pages: [1] 2   Go Down
Author Topic: LCD not working properly  (Read 1457 times)
0 Members and 1 Guest are viewing this topic.
Slovenia
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

First up: I am newbie in this area.

Second: My LCD does not work.

When I plug it in what it does it always displays all the black pixels in first row (5*8 - all 16 of them) and entire second row is blank.

I've set it up like this:

Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(10, 11, 12, 13, 14, 15, 16);
int n = 0;

 
void setup()
{
  lcd.clear();//clears
   
  lcd.print("Ozbolt is GAY");
 
  lcd.setCursor(0,1);
   
  lcd.print("not really");
}
 
void loop()
{}

When I run the attached code, It kind-a displays text, but only you see it if you look at it from an angle or you switch power to off.

Also the entire second row is always empty. It shines from the backlight but that is all.

Hope anybody here can instruct me on how to fix this or if it needs to be replaced.


Thanks for all your help, Ozbolt (and sorry for my lack of grammar knowdlage :/)

Logged

Windows - ReBoot; Linux - BeRoot

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8958
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When an LCD is only readable from a steep angle I suspect it is a problem with the contrast setting.  Look for a contrast control.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it's a Hitachi HD44780 driver LCD (usually a 16 input LCD), pin 3 (not labeled as such, but pin 1 is labeled and pin 3 is 2 away) is your contrast setting.

What most LCD things advise you to do is get a potentiometer with one side to GND, and the other to +5V and connect the wiper to pin 3 (which is labeled Vo).
Logged

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

Besides potentiometer, you're also missing the lcd.begin(16,2) from your setup(). Use it before you use the lcd.

Some time ago floresta replied to a post about not having the lcd.begin puts the lcd on a 1/8 (?) duty cycle with different contrast than properly initialized 2 line lcds with 1/16(?) duty cycles. I googled and couldn't find it. That is another factor on the lcd contrast.
Logged


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

It's here: http://arduino.cc/forum/index.php/topic,51198 in reply #4.  Let's get this part fixed first and see if all the other problems go away.

Don
Logged

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

Thanks guys this was much help. It is working now.
Logged

Windows - ReBoot; Linux - BeRoot

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

Thanks guys this was much help. It is working now.

 smiley-lol, "It wasn't working"->"It's working". Pretty big improvement over just two posts. Welcome to the forum and hope you stick around!
Logged


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


Hey guys! Im new to this forum and to the arduino..please be kind enough to help me out with my arduino (Mega 2560) problem..thanx in advance.

Ive been trying to get my 16x2 LCD working i bought it from ebay:
(http://www.ebay.co.uk/itm/HD44780-1602-16x2-162-LCM-Character-LCD-Display-Module-Blue-Blacklight-New-UK-/300717175591?pt=UK_Computing_Other_Computing_Networking&hash=item460423f327)

i tried running this code :


#include <LiquidCrystal.h>

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

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() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

after setting it up according to the tutorial at addafruit

http://learn.adafruit.com/character-lcds/wiring-a-character-lcd

 i'm sure all my connections are correct, the display works  according to the program  but it is very unclear even after adjusting the 10k pot..im not sure what the problem is please help me out..some extra info:

ive attached the LCD to the breadboard by means of soldering connector pins (not sure if this is the problem?)

the voltage out put between the middle pin and ground pin of the pot is 3.08v

I was able to get the first row showing before connecting the data pins but there was a thin line missing in the square blocks
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

the display works  according to the program  but it is very unclear even after adjusting the 10k pot..im not sure what the problem is please help me out..some extra info:

The first problem is that you are repeatedly writing to the LCD without any sort of delay to make what you have written readable. Try adding "delay(1000);" at the beginning or end of the loop() function.

If the display is still displaying the correct data but is unclear, then either your contrast pot is incorrectly set or you don't have the backlight connected. is the backlight working? btw some LCDs need a resistor in series with the backliight connection, others have it on the board already.

ive attached the LCD to the breadboard by means of soldering connector pins (not sure if this is the problem?)

That is the correct way.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1708
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@vasudev:

See, you're getting the same answer from different people to the same problem you posted in different threads.
Don't hyjack other threads by posting your unrelated questions in multiple exsisting threads.
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

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

Hey thank you so much for the quick replies..i apologise for having posted else where..it was not my intention to disturb anybody else's thread..was not sure how this forum worked and will keep it mind for the future..

will try adding a delay in the program..@dc42: I think my back light is working fine, but not sure if it has an inbuilt resistor as the LCD module didn't come with a data sheet smiley-sad..but heres a link to the pic: 

http://arduino.cc/forum/index.php/topic,154188.0.html..it is the one with the blue backlight

Logged

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

Hey..I tried your suggestions

@dc42.. added a delay in the program it did make the display clearer but only hello was seen (the second half had white squares)..this happened for about 2mins then all i could see was the first row of white squares. the backlight is working fine  tried adding a 220ohms and 110ohms resistance but it made the backlight flicker so i figured it worked better without the resistances..

@MAS32: I tried changing the speed hopefully that means the baud rate..but didnt help much..

now all i can see is a line of white squares in the first row..

PS: before i tried the above i set up the circuit again with only the power and the logic connected and this is what i saw (posting a pic)....is it possible that my LCD screen is faulty?...or should i try another value for the pot instead of the 10k...cause i noticed that when i plugged my arduino to the power adapter..it showed the second row slightly..but on the USB just the first row

thank you so much for helping me out smiley
Logged

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

pic of the initial setup..supposed to show the first row but if shows half the display instead:

 (read from another post Floresta: " With the potentiometer at one end of it's range the display will be blank and at the other end you should see boxes on the top line of the display.  If you do not get this behavior then it makes no sense to continue since no amount of programming will fix things.")


* IMG_0854.jpg (982.91 KB, 1536x2048 - viewed 18 times.)
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1708
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey..I tried your suggestions

@MAS32: I tried changing the speed hopefully that means the baud rate..but didnt help much..


The speed i was talking about, is your refresh speed.
So how often you write to your screen per second.
This has nothing to do with baudrates, as you are not using serial to write to your LCD.
What i told you, is the same thing dc42 told you.

Post your new code so we can have a look at that.

In your last picture only power and contrast are connected.
The display doesn't get a reset (because there is no device connected that can send that) so it might act like this (but as you already read somewhere, the boxes are expected in the top row).
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

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

Quote
In your last picture only power and contrast are connected.
The display doesn't get a reset (because there is no device connected that can send that) so it might act like this (but as you already read somewhere, the boxes are expected in the top row).
What he is doing is part of the troubleshooting process.  When you are troubleshooting a display problem you have to ascertain that it powers up properly and executes it's internal initialization steps without being confused by your code.  To do this you leave off all of the signal lines and see what happens when you apply power.

If the display is operating properly it will perform the internal initialization routine which leaves it configured for a one-line display.  This means that in the case of a 16x2 display only the top part will function, hence the expected single row of blocks.

In his case it is only the right half of the display that is functioning which indicates a different type of problem.  The HD44780U type controller deals with the display of the characters on the left half of a 16x2 device while the display of the characters on the right half are handled by an 'auxiliary controller', typically an HD44100 or equivalent.  In this case it looks like the auxiliary controller may be working but the main controller has a problem.  This could be due to a poor connection between the glass display and the pc board which may be temporarily alleviated by pressing down on the black bezel that surrounds the display.


Don
Logged

Pages: [1] 2   Go Up
Jump to: