LCD with strange problem

Hi all,
I've been playing around with the arduino uno I got for Christmas.
All is well, except for one strange thing with the LCD... It will display every letter properly, except for 0 and 8 at which point the screen has black boxes on, anyone know what this could be?

Google for the HD44780 data sheet.

It will show you the available characters in the standard chips.
All codes from 0-7 can be re-programmed with User defined custom patterns.

All the other codes are fixed in ROM. You can see the tables in the data sheet.
These can never be changed.

Yes, it does seem a pity that so many codes in the common chips are blank.

David.

It will display every letter properly, except for 0 and 8 at which

These are numbers not letters and it is not clear if you are referring to the actual numbers as represented by the ASCII codes 0x30 and 0x38 or to the custom patterns that you can program into memory address 0x00 through 0x07.

If you are referring to the latter then there is a problem with the library displaying the pattern located at address 0x00 but one technique is to access it as if it were in location 0x08.

Don

Hi sorry, I should clarify myself,
Yes letter A-Z, a-z display correctly,
however the numbers "0" zero and "8" eight cause the screen to go black.

I hope that helps :slight_smile:

That sounds very odd.

Please post your code. I am sure that it is a simple typo somewhere.

And an easy solution.

David.

It's bizzarely just started showing "0" and "8", but it will not work if for example I used this line:
lcd.print(millis() / 1000);

The screen flashes all black, at 0 and 8, then continues the sequence, 1,2,3,4,5,6,7,FLASH,9

#include <LiquidCrystal.h>
char ch;
int Progress = 0;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
byte zero[8] = {
  0b01110,
  0b10001,
  0b10011,
  0b10101,
  0b10101,
  0b11001,
  0b10001,
  0b01110
};

void setup() 
{
  Serial.begin(9600);
  Serial.println("LCD test with PWM contrast adjustment");
  lcd.createChar(0, 0);
  pinMode(13,OUTPUT);
  analogWrite(6,LOW);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("BCFC TEST DEVICE"); 
  delay(2000);
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("  DEVICE ACTIVE"); 
}

void loop() {
  if(Progress < 10)
  {  delay(1000);
  lcd.setCursor(Progress, 1);
  Progress = Progress + 1;
    lcd.print(Progress);
  }
  else
  {
    lcd.setCursor(0, 1);
    lcd.print("                ");
    lcd.setCursor(0, 1);
    lcd.print("     COMPLETE");
    while(1){}
  }
}

Sorry for messing around everyone, turns out I had plugged it into the 3.3v rail not the 5v. It's working perfectly now :slight_smile: