Displaying wrong characters on LCD. GDM1602A

Hello,

I have problem with displaying simple text on my LCD.

After sending simple program to LCD there is't text which I wrote in lcd.print("") comment.
Instead this text there are some characters on LCD, like in the picture.

Here is simple program:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world");
// lcd.setCursor(0,1);
}

void loop()
{
digitalWrite(8, HIGH);
digitalWrite(9, LOW);

lcd.setCursor(0,1);
lcd.print("fdshguifdhguifd");
lcd.print(millis()/100);
}

I'v tried on the GDM1602A and CBC0116002A. In both cases there is the same problem.

I use 328P ATMEGA.

I think that all is correctly wired according with instructions.

My best guess is that you've somehow transposed some of your connections.

If you want to troubleshoot your LCD then you really want to do everything in setup and nothing in loop. That way you will have an opportunity to see what was written before it gets overwritten.

#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()
  {
  }

Don