Arduino LCD Garbled with apparent offset ex. a = i

Been through every tutorial and message board I can find but have not been able to work this out. Any help appreciated with troubleshooting.

Simple set up, taken wiring apart and rebuilt many times. Reflowed all solder joints on LCD twice.

Background: Arduino Uno running Hello World to LCD 16 x2. Backlight good, contrast on pot- good. Using the following pins LiquidCrystal lcd (11,12,5,4,3,2) but have tried several different combinations. My arduino has know bad digital pin 8. Ran quick program to push all pins high... other digital pins check good. Verified wiring via multiple tutorials. Using 4 wire lcd hookup to D4,5,6,7 on the lcd which connect to 5,4,3,2 on arduino. Moved the LCD on breadboard, no change.

Symptoms: Program executes the following line in setup:

lcd.print("abcdefghijklmop") // line added to trouble shoot character garble... and then in loop():

lcd.setCursor(0,1); lcd.print(millis()/1000) //straight from Hello World program

The screen prints the following on line 0. "ijklmnohijklmnox" //seem to be a direct offset and some kind of repeat. On the second line is garble but I can see two of the digits(10 characters from start) counting with occasional numbers 8,9, rollover back to garbled chars

And another symptom: if I add to loop() after print millis: delay(3000); lcd.clear(); delay(3000);

The display will clear and nothing comes back. I also added a Serial print to the loop and it reports out on time showing the loop is running normally.

Any ideas?

John K

Hi jkcowboy, welcome.

The first test gives you some indication as to what might be wrong.
It looks like a single bit isn’t arriving at the controller on board of the LCD base PCB, or 2 wires are crossed.
The offset you see has 8 positions in the alphabet.
This could mean that bit 3 is stuck to the active level.

You can do some tests.
Remove the connection from one pin of the display, and hard-wire it to GND, and run your sketch.
Make a note of the result.
Now hard-wire that pin to 5V, and run the same test.
Note those results too.
You can do that with all data pins, but you might get in trouble during initialisation of the display (i really don’t know).
You could find out this way whether the problem is in the display itself (persisting problem on HIGH or LOW on that same pin which has the error) or somewhere else.
Somewhere else being the Arduino or the wiring.

Mas3, Thanks for the response. Test results:

  1. Each of the 4 inputs to the LCD were taken to ground and 5vdc and the sketch restarted. All test except one broke the sketch.
  2. When LCD D7 was taken to ground, row 0 showed same faulty results "ijklmnohijklmnox" as described above. Row 1 has some similar garble and some different with no signs of counting from the loop method.
  3. I wrote another sketch for arduino to drive all pins low. LED test showed all pins low. Same test high, shows all high except pin 8, broken and not used.

Still doesn't make sense to me, unless D7 is a MSB (8 bin position) (thought it was LSB from board pos) and stuck high internal.

Is this problem with LCD D7? or associated solder connection? I don't have a second LCD to prove this one quickly. The pin next to LCD D7 is +5VDC.

Starting to think I need another LCD to try again.

jk

ps- first time with an LCD display, was hoping it was going to work easy for me, maybe not.

If you have damaged D8 on your Arduino, there is little point in continuing. Just buy a new Arduino. You have probably damaged other bits too.

MAS3's test is not much good. The 4-bit lcd initialisation will work if DB7 is tied low.

Test your breadboard wiring with an LED and resistor. Blink all pins. Connect your LED to each pin in turn.

I have 8 leds on a 8-pin header. So I can test several pins at once. Instead of blinking all pins together, I shift a pattern through the Arduino pins. Any shorted tracks or broken tracks are seen immediately.

David.