LiquidCrystal only showing cursor?

I've coded up the original LCD tutorial, but I don't see any characters. All I get on the LCD is the underline cursor!

I see the LCD power up, and get the single underline cursor in the first step of the tutorial. When I try adding lcd.print( 'a' ); or lcd.printIn( string1 ); statements however, I see no characters. The cursor advances the correct number of characters, but everything is blank.

lcd.clear() does reset the cursor to the start.

This is a 16x2 Ocular 1622 LCD module. The datasheet says it has an ST7066 or ST7065 controller.

Any ideas?

I looked up the datasheet for the ST7066 controller, it says it is pin compatible with the Hitachi 44780 controller.

Did you put in the potentiometer to adjust the contrast of the display ?

Some displays are litteraly impossible to read without adjusting the contrast.

Yep, I did. Like I said, I can see the cursor advancing. It's nice and dark and very visible. Just no text.

If you can see and control the cursor it sounds like it is close to working. It could be a timing problem and there are subtle timing differences in the 8bit library code and the 8bit example linked in the playground.

If you are using the 8bit sketch example from here: http://www.arduino.cc/en/Tutorial/LCD8Bits, try using the Library code from here: http://www.arduino.cc/en/uploads/Tutorial/LiquidCrystal.zip

The latter version has a much longer delay after the enable and perhaps this will help.

I was using the LiquidCrystal.zip library with this code:

#include <LiquidCrystal.h>

LiquidCrystal lcd = LiquidCrystal();
char string1[] = "Hello!";

void setup( void )
{
  lcd.init();
  digitalWrite( 13, HIGH );
}

void loop( void )
{
  lcd.clear();
  delay( 1000 );
  lcd.print( 'a' );
  lcd.print( 'b' );
  lcd.print( 'c' );
  delay( 1000 );
  lcd.printIn( string1 );
  delay( 1000 );
}

Just for fun I tried the LCD8Bits code. It did the same thing, only showing a moving cursor.

I also tried the LCD4Bit library, it shows nothing at all with this code:

//example use of LCD4Bit library

#include <LCD4Bit.h> 
//create object to control an LCD.  
//number of lines in display=1
LCD4Bit lcd = LCD4Bit(2); 

//some messages to display on the LCD
char msgs[6][15] = {"apple", "banana", "pineapple", "mango", "watermelon", "pear"};
int NUM_MSGS = 6;

void setup() { 
  pinMode(13, OUTPUT);  //we'll use the debug LED to output a heartbeat

  lcd.init();
  //optionally, now set up our application-specific display settings, overriding whatever the lcd did in lcd.init()
  //lcd.commandWrite(0x0F);//cursor on, display on, blink on.  (nasty!)
}

void loop() {  
  digitalWrite(13, HIGH);  //light the debug LED

  //pick a random message from the array
  int pick = random(NUM_MSGS);
  char* msg = msgs[pick];
  
  lcd.clear();
  lcd.printIn(msg);
  delay(1000);
  digitalWrite(13, LOW);
  
  //print some dots individually
  for (int i=0; i<3; i++){
    lcd.print('.');
    delay(100);
  }
  //print something on the display's second line. 
  //uncomment this if your display HAS two lines!
  
  lcd.cursorTo(2, 0);  //line=2, x=0.
  lcd.printIn("Score: 6/7");
  delay(1000);
  
  
  //scroll entire display 20 chars to left, delaying 50ms each inc
  lcd.leftScroll(20, 50);
}

I’m beginning to wonder if I have a bad solder joint or something. I guess I’ll have a look at them. It’s maddening to get so close but still have it not work.

The LCD module is on the bench waiting for a resolder. Maybe that will get it working.

Success! It lives!

I ordered the most basic parallel LCD module from SparkFun and tried that. It worked great right off! Yea! I'm not crazy. Then I tried my original LCD harvested from a dead control box, and still no joy. I could see it had power and the pixels would flicker when it was supposed to update, but no text. So I got out a magnifier and had a look at the solder joints up close. I noticed a small bridge of flux between 2 pins, and scratched it off. TaDa! That fixed it. A tiny line of flux was doing my LCD in.

I'm really happy to have 2 working LCDs now. I had no idea the first one I harvested was so huge until I got the small one from SparkFun. Love it when annoying problems finally get solved!

Thanks for all the help on this one.