LCD blank on power up  --  SOLVED

just looking for some debugging suggestions.

I have an 8X2 LCD from sure electronics that generally works fine but occasionally (maybe 1 time in 10?) it comes up blank. I see the line of blocks which generally means it has power but then it blanks.

As far as I know the arduino itself is running and going through its initialization sequence which includes a "hello world" which I don't see. It also clears and writes to the display every 250 ms.

If I reset the arduino I always get the hello world and all is ok. This only happens on power up.

Any ideas or avenues to explore?

void lcdbegin(){ //RUNS ONCE IN SETUP
  delay(25); //make sure there's a clear delay for lcd power-on ititialization
  lcd.print("Hi Bill!"); delay(250); lcd.clear(); delay(5);
void updatedisplay(){//RUNS EVERY 250 ms
  lcd.setCursor(0,0); lcd.print(currentgear);
  lcd.setCursor(0,1); lcd.print(revratio);
  lcd.setCursor(4,0); lcd.print(int((avgtachrpm+50)/100)*100);//tach
  lcd.setCursor(5,1); lcd.print(int(roadspeed+.5)); //speed in kph

ok provisionally I've fixed it. I had a look at the LiquidCrystal contructor and there is initialization code in there - I just hadn't realized that.

I moved some of that into my lcdbegin routine and it seems fine.

  command(0x28);  // function set: 4 bits, 1 line, 5x8 dots
  command(0x0C);  // display control: turn display on, cursor off, no blinking
  command(0x06);  // entry mode set: increment automatically, display shift, right shift