16x2 LCD only displaying 80 characters. Is there a limit?
hi, i'm trying make twitter reader 16x2 lcd seems displaying 80 characters. there limit? code below doing text scroll gets cut off @ 80th character. i'm not sure if makes difference have i2c backpack on lcd , it's version 1 displayed here: https://arduino-info.wikispaces.com/lcd-blue-i2c
code: [select]
#include <wire.h>
#include <lcd.h>
#include <liquidcrystal_i2c.h> // f malpartida's newliquidcrystal library
#define i2c_addr 0x3f // define i2c address 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 lcd
// switch on backlight
lcd.setbacklightpin(backlight,positive);
lcd.setbacklight(high);
// reset display
lcd.clear();
delay(1000);
lcd.home();
// print on 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) left
// move center:
for (int positioncounter = 0; positioncounter < 16; positioncounter++) {
// scroll 1 position left:
lcd.scrolldisplayleft();
// wait bit:
delay(125);
}
// delay @ end of full loop:
//delay(2000);
}
the hd44780 controller has got 80 bytes of display ram. so can't expect store more on 8x2, 16x2, 16x4, 20x4, 40x2 display.
the 40x4 displays have got 2 hd44780 controllers. behave differently.
quite honestly, might keep track of lcd. buffer larger strings in arduino memory.
david.
the 40x4 displays have got 2 hd44780 controllers. behave differently.
quite honestly, might keep track of lcd. buffer larger strings in arduino memory.
david.
Arduino Forum > Using Arduino > Displays > 16x2 LCD only displaying 80 characters. Is there a limit?
arduino
Comments
Post a Comment