Maximum characters per line on an LCD

Hi All,

I have almost finished the project I am working on however I am struggling with displaying the results correctly on my 2x16 LCD display (DEM16217)

I am using the lcd.autoscroll and want all the text to stay on the bottom line of the lcd panel. I initially set the cursor position with lcd.setCursor(16,1) so text should appear on the bottom line.

However once about 20 characters have been printed, the next 20 characters appear on the top line and again once approx 20 characters have been printed on the top line further characters are printed on the bottom line again.

Is there a way to force the text to stay on the bottom line.

By the way thanks for all the help I have had so far, the community for Arduino is second to none. Cheers

Simon

Hi Simon,

can you share code? that is most helpfull.

What you might need is lcd.setcursor(0,1) and set the cursor to position 0 at line 1 before printing next 20 chars.

However once about 20 characters have been printed, the next 20 characters appear on the top line and again once approx 20 characters have been printed on the top line further characters are printed on the bottom line again.

This performance is easy to understand if you know the relationship between the memory addresses of the LCD controller and the character positions on the actual display itself. You will find an explanation if you follow the [u]LCD Addressing[/u] link at http://web.alfredstate.edu/weimandn. Read the first part, about the 40x2, before you scroll down to the 16x2 information.

Don