Pages: [1] 2   Go Down
Author Topic: Is something wrong with my LCD screen?  (Read 2163 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just got an Arduino and an LCD screen, and I can't seem to get the LCD to display anything. I've tried getting the HelloWorld demo to work, the one that comes with the Arduino software under the LiquidCrystal library. I've made a video of my setup, and I've also taken a closer picture of my soldering.


http://www.adamhorton.com/files/lcd.jpg

I'm able to get the backlight to work, and it looks like the contrast is working. What could be my problem here?
Logged

/dev/null
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you have an incompatible setup there.

The LCD you are using is not 16x2, as the code library you are trying to make work requires.  The one you are apparently using is 20x4  The LCD (just from looking at it has 20 pins (making it most likely a parallel data bus)...and you have 11 hooked up.  Obtain the data sheet for the LCD you are using, interface that with the arduino you are using with the required hookups, and then find a library which supports your LCD driver chip.


All you are currently doing now is powering the logic circuit and LCD backlight.
Logged

yes, have some.

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

Thanks for your help.

The display is 20X4 instead of 16X2. I've tried adjusting the lcd.begin statement to account for that but I get the same results.

There are 16 pins on my LCD, not 20 -- I've seen LCDs with 14 pins, without the extra two on the right that control the backlight, but other than that it looks to be the same as other LCDs that I've seen examples of, and they use the LiquidCrystal library. There are even labels on the pins (underneath where the header is on the video) that match up with all of the code examples I've seen.

This is the type of LCD I have: http://www.hacktronics.com/20-x-4-White-on-Blue/flypage.tpl.html

It comes with a tutorial, but no datasheet. Here's a link to the tutorial: http://www.hacktronics.com/Tutorials/arduino-character-lcd-tutorial.html

In that tutorial, there is a code sample that uses the LiquidCrystal library to drive the LCD, it's not all that different from the HelloWorld example I've been using. I've tried using that code example and I get the same results.

Are you sure it's not a problem with the library? Even if it was, I'm not sure where I would go to find a different one...
Logged

/dev/null
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please cut and paste the sketch you are working, that vid/cam resolution gives me eyestrain.
Logged

yes, have some.

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

http://www.adamhorton.com/files/lcd_circuit.jpg

The red numbers mean that the pins go to the corresponding pins on the Arduino. "wiper" means that it goes toward the wiper of the potentiometer.
Logged

/dev/null
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sketch ... (ie the code).

sorry.


you're POSITIVE the connections are good?
Logged

yes, have some.

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

Code:
/*
  LiquidCrystal Library - Hello World
 
 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 shows the time.
 
  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.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library 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(20, 4);
  // 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);
}

I've tested the connections as much as I can and I haven't found anything wrong, but don't know of a way to be POSITIVE that they're good... I suppose if everything else can be eliminated, that must be it, right?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you forgot or haven't set the cursor on the hello world!
 here replace that part of the code with this.

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(20, 4);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("hello, world!");
}

also try and maybe use 16,4 on the lcd.begin because I have a 16x4 LCD and had alot of trouble making it work and making it 16x2 or 16x4 made little difference, the way I got it to work in the end was to hook it up in 8 bit mode which you can see on my LCD post.
Logged

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

I tried it with and without the setCursor call, same behavior. I also tried hooking it up in 8-bit mode and I didn't get anything different, and all combinations of lcd.begin() with 16/20 and 2/4.

At one point, I managed to get a bunch of scrolling garbage characters on the screen for a few seconds instead of just a blank display, but I haven't been able to reproduce that behavior. For a moment I thought my LCD might not be broken, but that's what it's looking like to me.

Any more ideas?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried it with and without the setCursor call, same behavior. I also tried hooking it up in 8-bit mode and I didn't get anything different, and all combinations of lcd.begin() with 16/20 and 2/4.

At one point, I managed to get a bunch of scrolling garbage characters on the screen for a few seconds instead of just a blank display, but I haven't been able to reproduce that behavior. For a moment I thought my LCD might not be broken, but that's what it's looking like to me.

Any more ideas?

try taking away the counter and just have the word hello world displayed. also try and follow THIS guide which helped me and idk but might help you:  http://www.ladyada.net/learn/lcd/charlcd.html
Logged

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

You have not connected the enable pin (LCD pin 6) and you have  not grounded the R/W pin (LCD pin 5).

Don

P.S. I would have seen this earlier if it were in the 'Displays' forum.
« Last Edit: March 12, 2011, 07:23:20 am by floresta » Logged

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

floresta - looks like I did have a wiring error in the video. I've fixed it since and I still get the same behavior

polishdude20 - I've tried both of the things you've suggested, and I still get the same thing.

I've uploaded another video of my setup, which is now modeled after your tutorial, in case it makes any difference.



Thanks for your help.
Logged

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

These first two are red herrings, they won't help or hurt:
Quote
The display is 20X4 instead of 16X2. I've tried adjusting the lcd.begin statement to account for that but I get the same results.
You get the same results because the current LiquidCrystal library only checks the second value, and it only checks to see if that value is '1' or greater than '1'.

Quote
I tried it with and without the setCursor call, same behavior.
You do not have to set the cursor.  It is set to 0,0 when the LCD is initialized.

Quote
try taking away the counter and just have the word hello world displayed.
This is not a bad idea.  Having changing data in an initial program is a poor choice when it comes to troubleshooting.

Quote
For a moment I thought my LCD might not be broken, but that's what it's looking like to me.
I doubt that it is broken.

Your contrast may be set too high.  If you have a voltmeter you should find that the voltage at pin 3 is less than 1 volt when the display is correct.

You have used way too much solder - check both sides of the board for solder bridges between LCD pins.  Also, the connections to several of the pins on the LCD module don't look too good, especially 4, 5, and 11.


Don
« Last Edit: March 12, 2011, 10:52:30 am by floresta » Logged

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

I just thought of this:
Quote
I also tried hooking it up in 8-bit mode and I didn't get anything different,
If that was before you corrected the E and R/W connections then it would be a good idea to try it again.  There have been more than one instance of timing problems lately, possibly due to displays that slower than normal.  The 4-bit mode seems to be less tolerant of this condition.

Don
Logged

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

So I'll be the first person to tell you that my soldering skills are abysmal. I'm a software guy, and I haven't done much soldering in my time. I decided to just re-do my soldering, and look:

http://www.adamhorton.com/files/lcd02.jpg

Brilliant! I should be able to apply it to my project. Thanks again for all your help.
Logged

Pages: [1] 2   Go Up
Jump to: