LCD wraps output to 1 or 2 columns

Hi

I had had my SparkFun SerLCD V2.5 Serial Enabled 16x2 LCD setup with my Arduino and it worked well. Recently it started to act weird.

The simplest example code where the problem occurs is this:

#include <NewSoftSerial.h>

NewSoftSerial LCD = NewSoftSerial(255, 2); // LCD is connected to arduino on Pin 2

void setup()
{
  pinMode(2, OUTPUT);
  LCD.begin(9600);
  LCD.print("world");
}

void loop()
{
}
}

The word “world” should (and used to) appear on the LCD on line one. But now it weirdly wraps around to line two after the first letter.

A similar thing happens if I move the cursor to position 2 before printing. The text wraps to the second line and only the left-most four characters of the LCD show text.

However when I instead move the cursor to position 3 (or any position after that), the text appears as expected.

Any ideas what the cause of this behavior could be?

(I tested with arduino 0022 with its SoftwareSerial.h library and the NewSoftSerial library 10c)

What changed in between it working and it not working?

Did it definitely work?

Are you using the same version of Arduino software as you used before?

Are you using the same test sketch as you used before?

If the answer to all these is yes, then it is quite likely that it has a fault, or the Arduino has a fault, or there is a fault in the connection between the two.

Rewire it and then try a different Arduino board.

If neither of them fix the problem, its probably the LCD thats developed a fault.

Buy a new one and if it works with your setup, something else was to blame, but at least you now have two LCDs :wink:

lcdwrap,

Did you, at any time, upload to the Arduino with the LCD module connected to it? If you do a bit of searching here, you’ll find several discussions of how doing that can reprogram the LCD module to do odd things. The good news is that your search should also point you to a recovery procedure.

Happy Hunting,

Eric

What changed in between it working and it not working?

Nothing in the hardware setup changed.

I uploaded a slightly updated program to the Arduino (while the LCD module was connected).

But now it happens also with the old program code (or with any simple test example as in the original post above).

Rewire it

I did that just now. No change.

Did you, at any time, upload to the Arduino with the LCD module connected to it?

Yes.

If you do a bit of searching here, you’ll find several discussions of how doing that can reprogram the LCD module to do odd things.

I remember seeing warnings of that, but only if pin 0 or 1 are used. (So I used pin 3.)

The good news is that your search should also point you to a recovery procedure.

That would be great. Google didn't really turn anything up so far. So I would much appreciate if you could point me in the right direction!

Cheers.