LCD 8x2 - displays one row of black boxes

I have an 8x2 LCD that used to be working fine but now displays a row of black boxes no matter what code I upload. I have read previous forums and it is not the potentiometer problem, I can change the contrast with a 10K pot. I also have wired pin 5 R/W to ground. I also have rewired the LCD multiple times to ensure that the wire connections are good (different breadboards, different arduinos - uno & pro mini).

I believe the LCD has broke from uploading the wrong numbers in the Liquid Crystal lcd(rs, en, d4, d5, d6, d7) setup. Is that possible?

I borrowed a friends LCD and uploaded an initialization code I found online and now it no longer works as well.

Is there possibly a reset code to upload to these LCDs or is there a way to reset it to factory settings?

I can attach my pictures soon.

When a two row display shows a single row of boxes (or when a four row display shows two rows of boxes) it is an indication that it's controller has not been properly initialized. This can be the result of a problem with the code and/or with the wiring.

I believe the LCD has broke from uploading the wrong numbers in the Liquid Crystal lcd(rs, en, d4, d5, d6, d7) setup. Is that possible?

I don't think that the use of an improper constructor can damage your display. The fact that you can see a row of boxes and that you can change the contrast would indicate that your display is probably still functioning.

You mention having substituted different breadboards and different controllers but did you try different wires?

Submitting some pictures would be a good idea. Make sure we can unambiguously follow each wire from one end to the other. We also need to see the code that you used.

Don

I have 2 LCD problems, this is the LCD that I uploaded an intialization code and now it will not display the correct characters. Attached is the pictures.

I am running hello world, but it only displays the oooos as shown in the pictures.
The code I am trying to run is this:

/*

  • 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
    * LCD VSS pin to ground
    * LCD VCC pin to 5V
    * 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(3,4,11,7,10,8,13,5,12,6);
    LiquidCrystal lcd(12,11,10,9,8,7,6,5,4,3);
    void setup() {
  • // set up the LCD’s number of columns and rows:*
  • delay(1000);*
  • lcd.begin(16, 2);*
  • delay(1000);*
  • // Print a message to the LCD.*
  • lcd.print(“hello”);*
    }
    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);*
    }

image1 (1).JPG

image2 (1).JPG

image3 (1).JPG

image4 (1).JPG

Your photographs have too little resolution to be of much use. Surely your iPhone 6 can do better than that.

Why did you add the unnecessary delays to the example code?

Why didn’t you change the lcd.begin(. . .); statement to match your device? Although that’s not your problem it’s still a good idea.

Why did you change the descriptor → LiquidCrystal lcd(. . .); ? The numbers in the descriptor must match the connections to your Arduino. Even with the low resolution photos I can see that you are using a 4-bit interface (you aren’t using LCD data pins 0,1,2 or 3). Therefore the descriptor should contain 6 numbers if you connected the R/W line (LCD pin 5) to GND as instructed.

Instead of cobbling up the tutorial code you could try this:

#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()
  {
                                             // do nothing in 'loop'
  }

You won’t see the full message on your 8x2 but it should still work.

Don

I solved my problem. I had mixed up D0, D1, D2, D3 with D4,D5,D6,D7. Switched it in the code and it works!