Postion:Home > Display technology

Display technology

Character LCD Pinout Guide: HD44780 Pinout for 14, 16 and 40x4 Modules

Why character LCD pinouts are nearly all the same

Almost every character LCD module on the market runs an HD44780-compatible controller — SPLC780D, NT7070, ST7066, S6A0069 or KS0066. Because the controller dictates the interface, an 8x2, a 16x2 and a 20x4 module normally share an identical pin assignment. That is convenient: moving between sizes does not mean reworking the harness.

There are two things that break the pattern. A 40x4 module needs 160 character positions, twice what one controller can drive, so it carries two dies and a second enable line. And when the standard layout does not suit a board, the pinout itself can be changed — see Custom pinouts below.

14-pin assignment — no backlight

Found on reflective modules and on some transflective builds where no LED is fitted.

PinSymbolFunction
1VSSSignal ground
2VDDLogic supply, +5 V
3VOContrast adjust, 0 – 5 V
4RSRegister select: 0 = instruction, 1 = data
5R/WRead / write select
6EEnable — data is latched on the falling edge
7 – 14DB0 – DB78-bit bidirectional data bus

16-pin assignment — with LED backlight

The layout used by the great majority of character modules: 8x2, 16x1, 16x2, 16x4, 20x2, 20x4 and 40x2 all follow it.

PinSymbolFunction
1VSSSignal ground
2VDDLogic supply, +5 V (3.3 V versions available)
3VOContrast adjust, 0 – 5 V
4RSRegister select: 0 = instruction, 1 = data
5R/WRead / write select
6EEnable — data is latched on the falling edge
7 – 14DB0 – DB78-bit data bus (DB0 – DB3 idle in 4-bit mode)
15ALED backlight anode, positive
16KLED backlight cathode, negative

Pin assignment on a 40x4 — 18 pins, dual enable

A 40x4 display is really two 40x2 halves in one glass: 160 character positions, twice what one controller can drive, so the module carries two dies sharing one data bus and selects between them with two enable lines. Unlike the smaller sizes, the pin order on a 40x4 is not standardised across the industry — the table below is the layout we ship, and other makers arrange the same functions differently, so check the drawing before reusing a harness from another module.

PinSymbolFunction
1 – 4DB0 – DB3Data bus, low nibble (used alone in 4-bit mode)
5 – 8DB4 – DB7Data bus, high nibble
9E1Enable for controller 1 — lines 1 and 2
10R/WH: read, L: write
11RSH: data, L: instruction
12VOContrast adjust
13VSSSignal ground
14VDDLogic supply, +5 V
15E2Enable for controller 2 — lines 3 and 4
16NCNo connection
17LEDABacklight anode
18LEDKBacklight cathode

Because lines 3 and 4 reuse the same addresses as lines 1 and 2 rather than continuing onward, a display that only ever shows its top two rows is almost always an E1 / E2 selection problem rather than a fault.

4-bit vs 8-bit wiring

ModeData linesControl linesMCU pins
8-bitDB0 – DB7RS, R/W, E11
4-bitDB4 – DB7RS, R/W, E7
4-bit, write onlyDB4 – DB7RS, E (R/W to GND)6
40x4, 4-bitDB4 – DB7RS, R/W, E1, E28

4-bit mode sends each byte as two nibbles and is what Arduino and most microcontroller libraries use by default — the eight pins saved are rarely worth the lost speed, since a character display is limited by how fast a human reads anyway.

Supply voltage and the VO pin

Most character modules are 5 V parts; 3.3 V versions can be built on request. VO sets the contrast and is normally fed from the wiper of a 10 kΩ potentiometer wired between VDD and VSS. On a 3.3 V module the contrast voltage usually has to go slightly below ground, so those builds either carry a charge pump on board or expect one on the host. If a display powers up but shows nothing, contrast and initialisation — not the data lines — are the first things to check.

Custom pinouts

The standard assignment is a convention, not a limitation. If it does not line up with your board, three things can be changed:

  • Pin definition — reassign what an individual pin does, for example dropping the R/W line or bringing out a backlight enable.
  • Pin order — change the sequence along the header so the harness routes the way the board needs.
  • Pin exit position — bring the connection out of the top, bottom, left or right of the module, or replace the pin header with a flat FPC tail or a ZIF socket.

Typical reasons: the enclosure only leaves room for the cable on one side, the microcontroller is short of I/O, or an existing design has to drop in without rewiring. How much tooling is involved depends on how far the request moves from the standard build — send us the pinout you need and we will confirm what it takes.

Backlight colour

White LED is the standard backlight across the character range. Red, green and RGB backlights can be built when a project calls for a specific colour — status indication, night-vision compatibility, or simply matching a panel. The LCD mode (yellow-green, blue, grey, black and white) and the backlight colour are chosen independently of each other.

Operating temperature

Character modules are supplied for −20 °C to +70 °C as standard. Wide-temperature builds covering −30 °C to +80 °C are available for outdoor terminals, cold-chain equipment and vehicle installations, combining a wider-temperature liquid crystal with a correspondingly rated backlight.

Not every 16x2 is the same size

"16x2" describes the character format, not the hardware. Across our range the viewing area runs from 36 x 10 mm to 99 x 24 mm — a factor of six in area — so the useful question is how much window and how large a character the enclosure can take.

Part numberOutline (mm)Viewing area (mm)Dot pitch (mm)Best for
MLC162Y-853.0 x 20.0 x 8.136.0 x 10.00.36 x 0.40Smallest option, 2.15 x 4.25 mm characters
MLC162Y-285.0 x 36.0 x 13.055.45 x 10.750.60 x 0.65Low-profile window, only 10.75 mm high
MLC162Y-180.0 x 36.0 x 8.764.0 x 16.00.69 x 0.64Standard 1602 footprint, 8.7 mm thin
MLC162Y-3122.0 x 44.0 x 13.599.0 x 24.00.98 x 1.16Large 4.84 x 8.06 mm characters, read from a distance

All four share the same 16-pin single-enable assignment and the same HD44780-compatible command set, so the software does not change when the size does.

Frequently asked questions

Can a 3.3 V microcontroller drive a 5 V character display?

Not reliably. A 5 V module needs roughly 0.7 x VDD or more on its inputs to register a high level, which a 3.3 V output does not reach, and reading the module back puts 5 V onto the microcontroller pins. Either specify a 3.3 V version of the module or add a level shifter. Tying R/W to ground avoids the read direction but leaves the input threshold problem untouched.

What resistor does the LED backlight need?

The A and K pins connect straight to the LED with no limiting on board, so a series resistor is required. For a white backlight with a forward voltage around 3.0 – 3.4 V on a 5 V rail, 100 – 220 Ω is typical; the exact value follows from (VDD − Vf) / If using the rated current for that backlight. Driving A and K from a GPIO with no resistor is the fastest way to destroy it.

Why does my display show a row of black boxes?

One row of solid blocks means the module is powered and the contrast is high enough to see, but it has never been initialised — the controller is still in its default 8-bit, single-line state. Check contrast first, then the wiring and the initialisation sequence. A single row of blocks on a fresh 16x2 before any command is sent is normal.

Can a character LCD run on I2C or SPI?

Not by itself — the controller only speaks a parallel bus. A small backpack carrying a PCF8574 or similar expander sits between the host and the module and reduces the interface to two wires. We can supply the module with a backpack already fitted, which is often the simplest answer when I/O is tight.

How do I tell whether a module has one controller or two?

Count the enable pins. A single-controller module has one pin labelled E; a two-controller module has E1 and E2. Everything up to 80 characters — 8x2, 16x2, 20x2, 16x4, 20x4 and 40x2 — is a single-controller part, and 40x4 is the common size that needs two.

Does changing the pinout require tooling?

Reordering pins or moving where the cable leaves the module usually means a different PCB layout or FPC, so it depends how far the request departs from the standard build. Keeping the pin count and functions while changing only the order or the exit side is the least disruptive change; adding new functions or switching connector type takes longer.

CATEGORIES

CONTACT US

Tel: +86-755-27205930

Email: [email protected]

Add: No.205,A Zone,Mingyou Purchasing center,Baoyuan Road,Baoan District,Shenzhen,China