Go Down

Topic: LCD Display No Text? (Read 927 times) previous topic - next topic

Polymorphic169

I'm using the tutorial located here,
http://www.arduino.cc/en/Tutorial/LiquidCrystal

With no luck. I just got a HD44780 LCD, soldered the wires up and connected them to my arduino. I think my 10K pot is bad so I just left the display at max contrast. I can't see any of the text I'm sending the display though at all. It turns on, no text. I'm using 4 bit mode to save on some pins. What steps should I take to start trouble shooting this LCD?

RuggedCircuits

Too much contrast is as bad as too little, you'll just get the dreaded "black squares" problem. First steps to troubleshooting are to show us your wiring and your sketch.

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

Polymorphic169

It's a yellow on blue LCD, so would they be yellow squares? I've tried putting a resistor on the contrast, didn't help any.

Code: [Select]
// 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(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, 0);
  // print the number of seconds since reset:
  lcd.print("hello world!!!!!!!");
}


Wiring is

LCD 0 => Arduino Gnd
LCD 1 => Arduino 5V
LCD 2 => Left Open
LCD 3 => Pin 12
LCD 4 => Ground
LCD 5 => Pin 11

LCD D4=> Pin 5
LCD D5=> Pin 4
LCD D6=> Pin 3
LCD D7=> Pin 2


RuggedCircuits

Get rid of the loop() code for now. The setup() code should be enough to see if it's working.

You can't leave LCD pin 2 open. There does have to be pot there (or you can construct a voltage divider with discrete resistors but it will be a pain finding the right contrast).

Everything else looks OK.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

liudr

On the bad pot issue, do you have a multimeter to test it? The pot is required.

floresta

Quote
I think my 10K pot is bad
What makes you think it is bad?

Quote
I just left the display at max contrast
From a later post I see that this means you left the pin open.  This won't work but grounding it might work.

Quote
I can't see any of the text I'm sending the display though at all. It turns on, no text.
What do you see?  Is the screen blank?  Do you have one row of dark boxes?  Do you have two rows of dark boxes?  Do you have something else?  Each of these symptoms is the result of a different cause so what does happen when your display 'doesn't work' can give valuable clues as to the cause.

Quote
What steps should I take to start trouble shooting this LCD?
I suggest that you disconnect everything and then follow the tutorial at http://www.ladyada.net/learn/lcd/charlcd.html. About halfway through the tutorial, just before the section labeled 'Bus Wiring' is where the contrast is adjusted.  If your potentiometer doesn't work then you will have to be creative with the contrast pin.  Some displays work adequately with this pin connected to GND so you should try that first.  Most require a small positive voltage, usually less than 1 volt and some require a negative voltage (but those are rare, unless you got your display from a reputable dealer at a relatively low price).  If you can't get the display of a single row of moderately dark boxes then you need not continue.

By the way the LCD pins are numbered starting with 1, not 0, just like IC pins and the vacuum tube pins that preceded them.  The contrast voltage is applied to pin 3 which you are incorrectly calling pin 2.

The recommendation to initially leave loop empty is a good one.  You might want to write some static information to the second line (in setup) after you get the first line working.


Don

Go Up