Funky display results - Photos inside

Hi All,
My display is giving funky results
Here is the display I have

Here is the code I am using

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

Here is my wiring
+5V to pins 2(VDD) and 15(A)
Ground to pins 1(VSS), 5(RW), and 16(K)
.6V to pin Vo(3) - Note:If I increase the voltage to this pin the letters go away
Arduino pin 12 to pin RS(4)
Arduino pin 11 to pin E(6)
Arduino pin 5 to pin DB4(11)
Arduino pin 4 to pin DB5(12)
Arduino pin 3 to pin DB6(13)
Arduino pin 2 to pin DB7(14)

The pictures below are my results

Any advice is very appreciated

OK, splice this line in:

LiquidCrystal lcd(4, 6, 11, 12, 13, 14);

Paul__B: OK, splice this line in:

I am not home and wont be able to test this for several hours but once I do I will give feedback on the result. Just to clarify, do I add that line after the current line or replace the current line? I appreciate the help!

Yeah, replace!

Paul__B:
Yeah, replace!

Okay I will do that.
It appears that the numbers you are replacing are the corresponding numbers on the LCD as opposed to the numbers on the arduino board.

If that is the case, how does the software know what pins are connected at the board, or does it just translate the signal? The reason I ask is because the example uses arduino pins 12,11,5,4,3,2 but in my final project I would like to use arduino pins 9,8,7,6,5,4 (this isn’t necessary, that just happens to be the open pin I have… I can rearrange my current outputs to use the pins shown in the example if required).

I feel so lost with this, I am learning but it seems every step of the way I make mistakes.

Thanks again!

Things would be so much simpler if the perpetrators of the example sketches would have provided a few more comments and a made it easier to find out information about the constructor.

An initial program without any dynamic changes (an empty loop) also helps in troubleshooting.

#include <LiquidCrystal.h>

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

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

To find out more information about the constructor:

Don

floresta: You might want to touch up your soldering, it's hard to tell since your photos are kind of dark. https://learn.adafruit.com/adafruit-guide-excellent-soldering/common-problems

Yes, the soldering is not great, but I looked at it very carefully and could not spot an actual dry joint.

I suppose the code was not quite explicit but it should be reasonably obvious that you either have to make your connections match the instructions in the code, or make the numbers in the code match your connections.

Paul__B: Yes, the soldering is not great, but I looked at it very carefully and could not spot an actual dry joint.

I suppose the code was not quite explicit but it should be reasonably obvious that you either have to make your connections match the instructions in the code, or make the numbers in the code match your connections.

The instructions state

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)

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

My wiring is

+5V to pins 2(VDD) and 15(A) Ground to pins 1(VSS), 5(RW), and 16(K) .6V to pin Vo(3) - Note:If I increase the voltage to this pin the letters go away Arduino pin 12 to pin RS(4) Arduino pin 11 to pin E(6) Arduino pin 5 to pin DB4(11) Arduino pin 4 to pin DB5(12) Arduino pin 3 to pin DB6(13) Arduino pin 2 to pin DB7(14)

The way I see it I hooked it up exactly like the example. Which implies that the numbers in this line LiquidCrystal lcd(12, 11, 5, 4, 3, 2); match the pin numbers on the arduino. Your suggestion LiquidCrystal lcd(4, 6, 11, 12, 13, 14); implies the numbers match the LCD pins.

The way I see it I hooked it up exactly like the example. Which implies that the numbers in this line LiquidCrystal lcd(12, 11, 5, 4, 3, 2); match the pin numbers on the arduino. Your suggestion LiquidCrystal lcd(4, 6, 11, 12, 13, 14); implies the numbers match the LCD pins.

Each line in your description, although correctly describing the same connection, is in the reverse order from what we expect. I think this is what got Paul confused.

LCD RS pin to digital pin 12 = Arduino pin 12 to pin RS(4)

In any case I told you how to find more information about the constructor. You can find the definitive answer there.

Don

floresta: Each line in your description, although correctly describing the same connection, is in the reverse order from what we expect. I think this is what got Paul confused.

LCD RS pin to digital pin 12 = Arduino pin 12 to pin RS(4)

In any case I told you how to find more information about the constructor. You can find the definitive answer there.

Don

Right, so that means I still have the issue with the messed up LCD. Any advice on the initial pictures I posted?

How about providing a picture that lets us unambiguously follow each wire from the Arduino to the LCD. I am curious about the wires going to Arduino pins 10 and 13.

We also have to see the complete sketch that results in the 'funky' display.

Don

Here is the 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(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 will supply pictures of the actual arrangement once I get home.

10 is the power I am using for the backlight that goes to the potentiometer. It supplies approximately 1.5 volts and its not referenced in my code.

13 goes to an output I use in the final design.However almost all the wires have been disconnected from the final design to test the LCD.
I will remove the arduino from the fixture and set it on the table to test it by itself and provide a picture.

Thanks

So I went home and rewired it and now it works... Not sure what happened or what I changed. Thanks all

Disregard my last post... it seems as if the failure is intermittent.

If it is intermittent, then the connections are suspected. As the above contributors already have mentioned, check the quality of the connections. I haven't seen the pictures (due to the crappy picture support (or lack of it) of the forum lately). But the advice to check the Adafruit soldering course and tips is always a good one.

You've only got the display wired to the Arduino, right ? So no relays or so.

Why am I not surprised?

Now please provide us with the information I asked for in reply #10. The 'code' you provided in reply #11 is straight out of the Arduino tutorial and matches neither your previous photographs nor your subsequent description of the backlight wiring (which I suspect was actually the contrast wiring).

Don

MAS3: I haven't seen the pictures (due to the crappy picture support (or lack of it) of the forum lately).

It's very curious! It differs from browser to browser - on some, I can send it to Picture Viewer, on another I have manage to direct it back to Firefox but it insists on downloading it to /tmp in order to do so, and on one it asks if I want to save the file, giving no other option, then just ignores it!

I wish they would just repair the badly broken forum software!