Hello World Not Working

I am using this tutorial from the Arduino Website to set up my HD44780 display http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

When I upload the Hello World code from the Arduino Tutorial codes I get nothing. When I adjust the 10k Potentiometer, the top row of 16 boxes adjusts contrast but that is all. The pins on my LCD from Left to Right are VSS, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, A, and K. So my first pin is labeled VSS while the diagram has Gnd and my second pin is VDD not VCC. I have still it wired up the exact same as in the diagram, but I am not getting any words displayed on the LCD screen. Suggestions?

Thanks.

I have still it wired up the exact same as in the diagram, but I am not getting any words displayed on the LCD screen. Suggestions?

Disconnect everything and start over using this generic step by step approach that should work:

(1) If the module has a backlight then get it working properly. This involves only pins 15 and 16 on your LCD module. Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly. This involves only pins 1, 2, and 3 on your LCD module. You should be able to see blocks on one row of a two row display and on two rows of a four row display.

NOTE: The Arduino has not been used yet, except as a possible source for the power needed for the first two steps. Do not try to go any further until this is working. If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino.

(5) Upload your sketch and it should work.

If you still don't get a display then make sure that your wiring matches the numbers in the descriptor (or vice versa).

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

If you get a display but it is garbled or has some other problems then try again with a 'static' sketch, one that displays a simple message on the top row of the display and then stops. All of your code should be in setup() and loop() should be empty between the brackets.

If you are still having problems then we need to see a photograph of your setup that clearly and unambiguously shows all of the connections between your Arduino and your LCD module. We also need a copy/paste version of the code that you are actually using, not a link to the code that you think you are using.

Don

1 Like

I tried all of those except (1) and got the same result. I am not sure if the module has a backlight and have never connected anything to pins 15 and 16. What voltage should I apply to those pins?

Here are a few pictures of my setup and below is my code.


It is hard to see in this picture, but there are jumpers in 2,3,4,5,6,11,12, GND, and 5V.

/*
  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(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);
}

I wold recommend re-soldering the pins on your header.
Compare the way your solder & pins looks to the solder on the header
on the HelloWorld tutorial page:

You shouldn't see any gaps or holes around the pins.
Just a nice shiny slightly mounded bit of solder around the pin.

--- bill

ARosch:
I tried all of those except (1) and got the same result. I am not sure if the module has a backlight and have never connected anything to pins 15 and 16. What voltage should I apply to those pins?

It is a bit indistinct on your photo, but the big white thing sticking out the right hand side from under your LCD would be the backlight with an LED connected on the very end. These displays are pretty painful and useless without the backlight, so getting it working makes things a whole lot easier.

Pin 16 to ground, pin 15 to 5V. There is some concern that the display might not have an appropriate value for the series resistor (generally "R8" - should be about "101" or 100 ohms) but I have not encountered this so far.

At least you will be able to see the results.

I resoldered the pins and connected pin 15 to ground and 16 directly to the 5V. After adjusting the pot, I can now see that when I run the default hello world code that I posted above, it displays a bunch of blinking question marks on the bottom line. When I take out the part between the loop as suggested, I get two question marks on the bottom. I presume this to be a problem with my code?

Are you using a flux pen when you solder? If not, I recommend that you get one. It makes a huge difference.

Pete

... I get two question marks on the bottom. I presume this to be a problem with my code?

We need to see a copy/paste version of the code that you are actually using along with a photo of the resulting display. A copy of the code that you think you are using is not sufficient, we already know what that says.

A single photo of your setup, taken from directly above, that clearly shows the complete path of each wire will also be helpful.

Don