LCD-09568 Characters are not in the correct place

I have some code that writes through the serial port of an Arduino Uno to a 20x2 LCD (part #: LCD-09568).

The characters fail to come up in the correct position for lines 2 and 3. Lines 2 and 3 seem to be backwards (characters for line two are on line 3 and characters for line three are on line 4).

The code I have for putting the characters on the display is called "build_menu".

It is supposed to give me this:

Note: x=space

AZIxxxxxxYaw
ShoxxxxxxWrs
ElbxxxxxxJW1
PitxxxxxxJW2

What I get is this:

AZIxxxxxxYaw
ElbxxJW2xJW1
ShoxxxxxxWrs
Pit

The "build_menu" program uses four other functions: selectLineOne, selectLineTwo, selectLineThree and selectLineFour.

Just above selectLineOne, there is a note that shows the map of the LCD display addresses (in hex). It includes an example (the first line).

According to the display application note setting the cursor position you send the control character (0xFE) and then the command (0x80 +n).

Display.ino (11.7 KB)

I found the solution. You need to pay attention to the "SerLCDv2.5" Serial Enabled LCD document. There on page 3 they outline the "Viewable Cursor Positions" for each display. You will see that line's 2 and 3 are swapped sequentially.