LCD1602 1 line only

I am a noob trying out LCD1602 display, but seems only 1 line works, in the middle.

'ABCDEFGH'....I notice only 8 chars print and stops.

After reading some similar posts here, l tried

lcd.setCursor(0, 0);
lcd.print("ABCDEFGH");

lcd.setCursor(0, 1);
lcd.print("ABCDEFGH");

so now I can get the entire screen to fill across:

ABCDEFGHABCDEFGH

maybe I don't have a needed include statement?

...or I been snookered off eBay and it's not a true 16x2 board o_O
I see 1 glob on back of board.

In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the </> icon from the ‘reply menu’ to attach the copied sketch.

Don’t post snippets (Snippets R Us!)

double Check your wiring esp. if you Do not have an I2C backpack

oh...I do not have a I2C back pack...I guess I need to obtain one?

// LCD1602 Display for Arduino

#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {

lcd.begin(8, 2);

}

void loop() {

lcd.setCursor(0, 0);
lcd.print("ABCDEFGH");

lcd.setCursor(0, 1);
lcd.print("ABCDEFGH");

delay(500);

}

lcd.begin(8, 2) This means you are wanting a 2 line display with only 8 columns.

Try:
lcd.begin(16, 2)


What size of display did you buy ?

O.K...it works now as 1 long line with that statement.

However- still looks like this isn't 16 x 2 lines, still only 1 line.


#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {

  lcd.begin(16, 2);

}

void loop() {
  
    lcd.print("ABCDEFGH12345678");

  delay(500);

}

3.147" x 1.417" PCB measures

It makes wiring easier but it’s not mandatory

Set the cursor on line 2 and print something else..


lcd.setCursor(0, 0);
lcd.print("first line");

lcd.setCursor(0, 1);
lcd.print("second line");

Seems strange. Can you post a photo of the back of the board.

Certainly has 16x1 printed on the back. The one blob controller means that it is initialized with
lcd.begin(16,1)
not
lcd.begin(8, 2);

1 Like

Thank you for the tips and info, I see I been eBay snookered on 3 of these boards.
I did manage to get one w/2 blobs, guess means it has 2 control chips?

and it is now working as written! - Boo-ya...2 whole lines.
Hard lesson but now I know these boards look alike but have differences -read the fine print :eyes:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.