CNAP

LCD 2004 Reference

A 20-column, 4-row character LCD with the same HD44780-compatible 16-pin interface as the LCD 1602, rendered larger.

Pin names

NameDescription
VSSGround
VDDPower (5V)
V0Contrast — tie to GND for max contrast in the simulator
RSRegister Select
RWRead/Write — tie to GND to always write
EEnable
D0–D7Data bus (only D4–D7 needed in 4-bit mode)
ABacklight LED anode
KBacklight LED cathode

Attributes

This component has no configurable attributes.

Usage

Wiring is identical to the LCD 1602 — only the lcd.begin() call changes, from (16, 2) to (20, 4).

#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() {}

In real hardware, wire RW and V0 to GND, and power the backlight (A) through a 220 Ω resistor from 5V, with K to GND.

Examples

DescriptionAttrs
Default 20×4 display{}

See also

  • LCD 1602 — same interface, smaller 16×2 display
  • SSD1306 OLED — graphical alternative using I²C instead of a parallel bus