Autoscroll problem with 16x2 LCD

Hi everyone,

I’m new to the Arduino community and loving it! But I find myself stuck with a problem using the ‘autoscroll()’ function with a standard 16x2 LCD display. I’m hoping one of you experts can tell me where I’m going wrong.

I’m trying to implement a scrolling message along the lower line of the display. I started out with the ‘autoscroll’ example included with the library and simplified it slightly to include only the scrolling section. So far, so good. However, I find that if I increase the number of ‘loops’ in the lcd.print section to more than 17, the printing jumps from the lower to the upper line of the display. Any ideas why?

I’m using a duemilanove 328 with v018 software.
I have changed the designation of the lcd interface pins to avoid conflict with an ethernet shield (which is currently attached) and have confirmed that the wiring is correct. The display is acting normally otherwise, and works fine with the other example code.

Thanks guys. Any help would be greatly appreciated!

Here’s a simplified version of my code which is enough to demonstrate my problem…

#include <LiquidCrystal.h>

LiquidCrystal lcd(9, 8, 5, 4, 3, 2);    // initialize 

void setup() {
  lcd.begin(16,2);                      // 16 cols, 2 rows
}

void loop() {
  lcd.setCursor(16,1);
  lcd.autoscroll();

  for (int x = 0; x < 30; x++) {        // OK for <17 loops 
    lcd.print(x);                       // but problems for more loops.
    delay(200);
  }
  lcd.clear();
}

First off, I recommend you try liquidcrystal440 (just search for it) as it is a much better updated version. That might solve the problems, if not then your code might need looking at.

However, I find that if I increase the number of 'loops' in the lcd.print section to more than 17, the printing jumps from the lower to the upper line of the display. Any ideas why?

This is a function of the controller on the LCD module. Follow the [u]LCD Addressing[/u] link at http://web.alfredstate.edu/weimandn for more information.

LiquidCrystal440, mentioned above, was originally designed to deal with the 40x4 LCD modules but it has also has addressed many of the scrolling issues by compensating for the LCD controller operation in software.

Don

These suggestions worked like a charm!

Thank you so much.