16x2 LCD only displaying 80 characters. Is there a limit?

Hi, I’m trying to make a Twitter reader but my 16x2 LCD seems to only be displaying 80 characters. Is there a limit? My code below is doing a text scroll but it gets cut off at the 80th character. I’m not sure if it makes a difference but I have a I2C backpack on my LCD and it’s version 1 as displayed here: https://arduino-info.wikispaces.com/LCD-Blue-I2C

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h> // F Malpartida's NewLiquidCrystal library
#define I2C_ADDR 0x3F // Define I2C Address for controller
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
#define BACKLIGHT 3

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup() {
lcd.begin (16,1); // initialize the lcd

// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT,POSITIVE);
lcd.setBacklight(HIGH);

// Reset the display
lcd.clear();
delay(1000);
lcd.home();

// Print on the LCD
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Ten million tonnes of fish wasted every year despite declining fish stocks...80");
}

void loop() {
// scroll 20 positions (display length + string length) to the left
 // to move it back to center:
 for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
   // scroll one position left:
   lcd.scrollDisplayLeft();
   // wait a bit:
   delay(125);
   }

  // delay at the end of the full loop:
  //delay(2000);
}

The HD44780 controller has only got 80 bytes of Display RAM. So you can't expect to store any more on a 8x2, 16x2, 16x4, 20x4, 40x2 display.

The 40x4 displays have got two HD44780 controllers. So they behave differently.

Quite honestly, you might just as well keep track of the LCD. Buffer larger strings in your Arduino memory.

David.

david_prentice:
The HD44780 controller has only got 80 bytes of Display RAM. So you can't expect to store any more on a 8x2, 16x2, 16x4, 20x4, 40x2 display.

The 40x4 displays have got two HD44780 controllers. So they behave differently.

Quite honestly, you might just as well keep track of the LCD. Buffer larger strings in your Arduino memory.

David.

Hi David

Thank you for that information re: the 80 bytes of display RAM. I did not know that. Seeing as though I'm quite green when it comes to Arduino and programming, do you have any reading suggestions or tutorials on how I may buffer larger strings to Arduino memory? Or perhaps it would be more appropriate to obtain an LCD that has more display RAM?

Thanks again for helping a n00b out.

Draw your long sentence on a piece of paper in ink.

Then with your pencil, draw a box around 16 of the letters.
Draw another box starting one letter from the first one.
Now think of the special cases e.g. when you get to the end of the sentence.

Each 16x1 box is what you will send to your LCD every 200ms or so. The text will scroll past your eyes at a reasonable speed.

A simple kludge is to just append 16 spaces to your sentence to cope with the end case.

Your LCD will look better if you overwrite with the next message. You could clear the whole display before writing each block of 16 letters but it flashes at you.

David.