CCNAP

TPL-09Templates/LCD 2004 Four Rows

LCD 2004 Four Rows

Writes a static message to all four rows of a 20×4 LCD using the LiquidCrystal library in 4-bit mode. Identical wiring to the 1602 — only lcd.begin() changes.

Open in Playgroundintermediate · LCD · display · LiquidCrystal · text · 2004
intermediate

FIG. 1LCD 2004 Four Rows · circuitTPL-09

02Sketch

sketch.inoArduino C++
15 lines
// LCD 2004 — fills all four rows
#include <LiquidCrystal.h>

// RS, E, D4, D5, D6, D7
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(20, 4);
  lcd.setCursor(0, 0); lcd.print("Row 0: Hello!");
  lcd.setCursor(0, 1); lcd.print("Row 1: Arduino");
  lcd.setCursor(0, 2); lcd.print("Row 2: LCD 2004");
  lcd.setCursor(0, 3); lcd.print("Row 3: 20 x 4");
}

void loop() {}

03Components

  • 01wokwi-arduino-uno
  • 02wokwi-lcd2004

04Wiring

Component pinArduino pin
RSPin 12
RWGND
E (Enable)Pin 11
D4Pin 5
D5Pin 4
D6Pin 3
D7Pin 2
VSS, V0, RW, KGND
VDD, A (via 220 Ω)5V

All templates

Ready when you are

Have a circuit in mind?

No hardware, no installs — a browser is enough.