Character LCD, 20x4
Four rows of twenty on the same controller as the 16x2. Text that runs off row 0 carries on in row 2.
- 16 pins
- In 1 project
- In 1 lesson
The Character LCD, 20x4 in brief
What it is, and where it sits on the bench.
The LCD2004 is the 20x4 character LCD with the bare sixteen-pin header, VSS, VDD, V0, RS, RW, E, D0 to D7, A and K, on the same HD44780 controller as the 16x2. Unlike the lcd2004i2c, it has no PCF8574 backpack and no address. It is a 5 V module. In four-bit mode it takes six signal wires, RS, E and D4 to D7, to any digital pins on an Uno, with RW tied to ground; an ESP32 can drive the same six from its 3.3 V pins while VDD stays on 5 V. Mokxi models the four-bit start-up, the byte taken on the falling edge of E, the busy time after every byte and after a clear, CGRAM, and the contrast: the drive is VDD minus V0, so V0 at ground is fully dark and a 10 k pot shows text only near its ground end. Four rows are the controller’s two 40-character lines, so the rows start at 0x00, 0x40, 0x14 and 0x54 and a long print runs off row 0 into row 2. Nothing is read back, there is no 5x10 font, and bias, temperature and viewing angle are not modeled.
- Family
- Displays
- Pins
- 16
16 pins
Named as the editor names them, so a wire lands where you expect it.
VSS is dark text; at VDD the glass is empty.How to use a 20x4 LCD with an Arduino, without I2C
Six signal wires in four-bit mode: RS to pin 2, E to 3 and D4 to D7 to pins 4 to 7. VDD goes to 5 V, and VSS, RW and V0 to GND, which puts the contrast at full. Create a LiquidCrystal with those six pins and call begin(20, 4): the 20 and the 4 are what give setCursor() the right row starts.
The controller has two lines of memory, not four, so the rows start at 0x00, 0x40, 0x14 and 0x54. In the project beside this, the bare panel prints forty characters in one go and the second twenty land in row 2, not row 1. If the glass is empty, look at V0: on a 10 k pot the text only shows near the ground end of the turn.
LiquidCrystal compiles on every board here. With the backpack fitted it is the lcd2004i2c part instead, on two wires.
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7); // RS, E, D4 to D7
void setup() {
lcd.begin(20, 4);
lcd.print("Row 0");
lcd.setCursor(0, 1);
lcd.print("Row 1");
lcd.setCursor(0, 2);
lcd.print("Row 2 starts at 0x14");
lcd.setCursor(0, 3);
lcd.print("Row 3 starts at 0x54");
}
void loop() {}What is true about the Character LCD, 20x4, here
In its help article’s own words: what the simulation gets right, and where it stops.
Not modeled
The same as the 16x2: nothing is read back (the busy flag, the address counter and DDRAM all read nothing), there is no 5x10 font, and bias, temperature and viewing angle do not exist. On the backpack, the PCF8574's input port and its interrupt pin are not there either.
From 20x4 character LCD, in full.
See the Character LCD, 20x4 in a project
One built-in project uses it. It opens in the editor, already wired.
Where it turns up in a lesson
One lesson places it in its own circuit.
The boards it is shown on
This board has a built-in project with the Character LCD, 20x4 in it.
Arduino libraries for the Character LCD, 20x4
Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Character LCD, 20x4
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.