LCD 1602a displays the wrong characters [bad wiring]

I'm having trouble with an LCD 1602a. It's showing the wrong characters

#include <LiquidCrystal.h>

const int rs = 2, 
          en = 3, 
          d4 = 6, 
          d5 = 7, 
          d6 = 8, 
          d7 = 9;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  lcd.begin(16, 2);
  Serial.begin(9600);
    lcd.setCursor(0, 0);
  lcd.print("Hello world");
}

void loop(){
}

outout
Scr

Please help.

Please read the section about how to participate in the forum. Use Tools/Autoformat, post all code in code tags, all errors in code tags, and include a readable wiring diagram, hand drawn is ok.

1 Like

I expect a wiring error. If you compare what you sent with what is displayed you will see the high order bit is always on.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.