Two white rows on 20x4 I2C LCD display

Hi, I recently bought white & blue 20x4 I2C LCD display but after putting my code into arduino I found out that the lower two rows stay white no matter what I do. The upper two rows work just fine. I'm using LiquidCrystal_V1.2.1 library which should have no problems with 20x4 I2C displays. Even when I set the cursor on third row and wriite a word there, it still stays white. Ideas? I'm worried it can be hardware issue. My code:

#include <SPI.h>
#include <SD.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);
File root;
const int chipSelect = 4;

void setup()
{
  lcd.begin(20,4);
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);
  Serial.begin(9600);

  Serial.print("Initializing SD card...");
  pinMode(SS, OUTPUT);

  if (!SD.begin(chipSelect)) {
    Serial.println("initialization failed!");
    lcd.setCursor(2,2);
    lcd.print("No card inserted");
    return;
  }
  else {lcd.setCursor(4,0);
        lcd.print("Card present");}
        
  Serial.println("initialization done.");
  

  root = SD.open("/");
  
  printDirectory(root, 0);
  
  Serial.println("done!");
}

Many concerns here.

First, drop the SD card stuff, write a version which just prints something on each of four lines.

Next, post a picture (preferably inline, not as an attachment) of the behaviour.

So I reduced my code to minimum:

#include <LiquidCrystal_I2C.h>
#include <Wire.h>

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);
const int chipSelect = 4;

void setup()
{
  lcd.begin(20,4);
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);
  Serial.begin(9600);
  lcd.setCursor(0,0);
  lcd.print("hello");
  lcd.setCursor(0,1); 
  lcd.print("world");
  lcd.setCursor(0,2); 
  lcd.print("here");  
  lcd.setCursor(0,3); 
  lcd.print("I am");
}

void loop()
{
}

But sadly, it didn't help. Here's the picture:

I think it's faulty display in fact I found similar problem to mine here:
http://forum.arduino.cc/index.php?topic=274974.0

I think it's faulty display ...

I think so too. Too bad AngryBaldMan (from the similar problem you linked to) never reported back to let us know if a new display fixed the problem.

Don


Yes, well it does look as if that could be the case as you appear to have all the correct numbers in your code.

except
Your descriptor includes pin numbers 0 and 1. These are the serial interface to the ATmega chip from the USB, and unless you have a really, really good reason to use these for something other than serial communication, you should not use these pins. I doubt however that this could be the cause of the problem as such. Unlikely.


Picture gone?

That's the trouble with using crap sites like "dropbox".

Paul__B:
Your descriptor includes pin numbers 0 and 1. These are the serial interface to the ATmega chip from the USB, and unless you have a really, really good reason to use these for something other than serial communication, you should not use these pins.

I used those pins on 16x2 display and everything worked fine. Now I tried to change the pins but still the same result.

Paul__B:
except
Your descriptor includes pin numbers 0 and 1. These are the serial interface to the ATmega chip from the USB, and unless you have a really, really good reason to use these for something other than serial communication, you should not use these pins. I doubt however that this could be the cause of the problem as such. Unlikely.

I think you have had a brain fart.
The pin numbers in the I2C constructor are the i/o pin numbers for the PCF8574 not the Arduino.

--- bill

bperrybap:
I think you have had a brain fart.
The pin numbers in the I2C constructor are the i/o pin numbers for the PCF8574 not the Arduino.

Quite right.

Getting too keen to find the answer to a vexed problem, confusing myself!

Please ignore my previous rant.

lower two rows stay white no matter what I do

Are you saying that when you power up the LCD , without any software running, ALL the rows display 5x7 characters?

Guuuys, strange things are happening. Watch:

I think there's no doubt now that it's faulty.

Your display is clearly broken.

Just buy a new module from Ebay. They are not expensive.

David.

I asked the seller to resend, so when I get another one I will report here hopefully with good news.

So, my new 20x4 display arrived today and I can report with good news, all is working well. :slight_smile: