1

Here's my code:

#include <LiquidCrystal.h>
int rs = 11;
int rw = 10;
int en = 9;
int d0 = 1;
int d1 = 2;
int d2 = 3;
int d3 = 4;
int d4 = 5;
int d5 = 6;
int d6 = 7;
int d7 = 8;
LiquidCrystal lcd(rs, rw, en, d0, d1, d2, d3, d4, d5, d6, d7);
void setup() {
 // put your setup code here, to run once:
 lcd.begin(16, 2);
 Serial.begin(4800);
 lcd.setCursor(0,0);
 lcd.print("Loading...");
 delay(3000);
 lcd.setCursor(1,1);
 lcd.print("waht");
}
void loop() {
}

And here's the output: enter image description here

Also note the first line of text starts in the second column. I've tried with a different LCD and the same issue occurs. It seems to go one character further in ascii (ex: the '.'s become '/') if that's any clue to what's going on. In a separate program (exact same setup) I can print "Hello World" on the first line no problem. Anyone know why it's doing this and how to fix it? Thanks

asked Jun 4, 2021 at 5:45
2
  • 3
    Looks like it gets one or two least significant bits wrong. So check wiring and so Commented Jun 4, 2021 at 6:58
  • 2
    Btw, Arduino pins 0 and 1 are wired to USB serial (on many boards) - so you can try it without Serial.begin and if it works, just move pin(s) to not use arduino pin 1 Commented Jun 4, 2021 at 7:52

1 Answer 1

2

Your Least Significant Bit is always 1 (Check the ASCII table to see this). You might have a problem with your wiring, double check the pin you use and that the continuity is good.

Also, as KIIV said in comment, depending on the board you use, you might have a conflict with the serial port (Which pull the line high when not transmitting, explaining the result you get). Try moving pin 1 to another one.

answered Jun 4, 2021 at 9:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.