2 added 103 characters in body
source | link

Not having the source of those libraries I can't tell you how to fix it, but I can help you understand the problem so you may be able to sort it out yourself.

Here's a memory map for a typical 16x4 LCD display (Displaytech 164A series):

enter image description here ...and here's the map for a typical 20x4 (Displaytech 204A series):

enter image description here

As you can see, the third and fourth lines both start 4 locations further up in the display memory. Using code designed for thethis 20 column display to drive athe 16 column display will work fine for the first two lines but place the third and fourth lines four spaces to the right - exactly whatsimilar to the problem you're seeing, but the particular displays you use probably have slightly different display memory maps.

The cursor position you specify as row and column is converted by the driver code into the memory address that is passed to the display (i.e. it's not done by the display itself) so the library has to know how to carry out the mapping. It'll either be done by configuration settings somewhere or hardcoded into the driver routines themselves.

Not having the source of those libraries I can't tell you how to fix it, but I can help you understand the problem so you may be able to sort it out yourself.

Here's a memory map for a typical 16x4 LCD display (Displaytech 164A series):

enter image description here ...and here's the map for a typical 20x4 (Displaytech 204A series):

enter image description here

As you can see, the third and fourth lines both start 4 locations further up in the display memory. Using code designed for the 20 column display to drive a 16 column display will work fine for the first two lines but place the third and fourth lines four spaces to the right - exactly what you're seeing.

The cursor position you specify as row and column is converted by the driver code into the memory address that is passed to the display (i.e. it's not done by the display itself) so the library has to know how to carry out the mapping. It'll either be done by configuration settings somewhere or hardcoded into the driver routines themselves.

Not having the source of those libraries I can't tell you how to fix it, but I can help you understand the problem so you may be able to sort it out yourself.

Here's a memory map for a typical 16x4 LCD display (Displaytech 164A series):

enter image description here ...and here's the map for a typical 20x4 (Displaytech 204A series):

enter image description here

As you can see, the third and fourth lines both start 4 locations further up in the display memory. Using code designed for this 20 column display to drive the 16 column display will work fine for the first two lines but place the third and fourth lines four spaces to the right - similar to the problem you're seeing, but the particular displays you use probably have slightly different display memory maps.

The cursor position you specify as row and column is converted by the driver code into the memory address that is passed to the display (i.e. it's not done by the display itself) so the library has to know how to carry out the mapping. It'll either be done by configuration settings somewhere or hardcoded into the driver routines themselves.

1
source | link

Not having the source of those libraries I can't tell you how to fix it, but I can help you understand the problem so you may be able to sort it out yourself.

Here's a memory map for a typical 16x4 LCD display (Displaytech 164A series):

enter image description here ...and here's the map for a typical 20x4 (Displaytech 204A series):

enter image description here

As you can see, the third and fourth lines both start 4 locations further up in the display memory. Using code designed for the 20 column display to drive a 16 column display will work fine for the first two lines but place the third and fourth lines four spaces to the right - exactly what you're seeing.

The cursor position you specify as row and column is converted by the driver code into the memory address that is passed to the display (i.e. it's not done by the display itself) so the library has to know how to carry out the mapping. It'll either be done by configuration settings somewhere or hardcoded into the driver routines themselves.