16×1, 8×1 and 40×2 Character LCDs: Addressing, Controllers and Uses

Quick answer: 8×1, 16×1 and 40×2 character LCDs use the same HD44780-type controllers as the common 16×2 and 20×4 modules, but their memory addressing catches many designers out. An 8×1 is the simplest: eight characters at addresses 0x00 to 0x07. Many 16×1 modules are wired as two 8-character halves, so characters 9 to 16 start at address 0x40, not 0x08. A 40×2 uses the controller’s full 80-character memory: 0x00 to 0x27 on line 1 and 0x40 to 0x67 on line 2.

Check the module’s datasheet for the duty ratio before writing code: 1/16 duty on a one-line display means the split addressing.

S4417D dot-matrix chip-on-glass LCD module (SuccessLCD catalogue photo)
Catalogue example: S4417D, a dot-matrix chip-on-glass LCD reference for CB radios. Photo: SuccessLCD.

Character LCD Formats And Addresses

FormatLine 1 addressesLine 2 addressesController mode and dutyDriver note
8×10x00–0x07–1-line, 1/8 duty (1/11 with a 5×10 font)An HD44780-type controller drives 8 characters on its own
16×1, split type0x00–0x07, then 0x40–0x47–2-line, 1/16 dutyController alone; the second “line” is the right half of the row
16×1, linear type0x00–0x0F–1-line, 1/8 duty (1/11 with a 5×10 font)Needs extra segment outputs from an extension driver
16×20x00–0x0F0x40–0x4F2-line, 1/16 dutyNeeds extra segment outputs
20×20x00–0x130x40–0x532-line, 1/16 dutyNeeds extra segment outputs
24×20x00–0x170x40–0x572-line, 1/16 dutyNeeds extra segment outputs
40×20x00–0x270x40–0x672-line, 1/16 dutyUses all 80 characters of display memory

An HD44780-type controller has 16 common and 40 segment outputs. Forty segment lines cover eight 5-dot-wide characters, which is why it can drive an 8×1 or a split 16×1 alone, while wider lines need extension drivers or a controller with more outputs. A 40×4 module uses two controller sections, each addressed like a 40×2. The 20×4 and 16×4 addresses are listed in the HD44780 commands section of the character LCD guide.

The 16×1 Split-Address Problem

On the common split 16×1, the controller treats the single row of glass as two lines of eight characters. The left half is line 1 (0x00–0x07) and the right half is line 2 (0x40–0x47). Two things follow:

  • The controller must be set to 2-line mode (function set 0x28 in 4-bit mode or 0x38 in 8-bit mode), even though the glass has one row. In 1-line mode the right half stays blank.
  • Text does not flow from character 8 to character 9. After eight characters, send the Set DDRAM address command 0xC0 to continue on the right half.

To tell the two types apart without a datasheet, initialize in 2-line mode, clear the display and write 16 characters in a row. If only the first eight appear, the module is the split type. Many character LCD libraries handle it if the display is declared as 8 columns × 2 lines.

DDRAM addresses of split and linear 16×1 character LCDsTwo rows of 16 character cells. On the split type, characters 1 to 8 use addresses 0x00 to 0x07 and characters 9 to 16 use 0x40 to 0x47. On the linear type, all 16 characters use 0x00 to 0x0F.Split 16×1: 2-line mode, 1/16 duty10x0020x0130x0240x0350x0460x0570x0680x0790x40100x41110x42120x43130x44140x45150x46160x47Line 1: 0x00–0x07, cursor command 0x80Line 2: 0x40–0x47, cursor command 0xC0Linear 16×1: 1-line mode, 1/8 duty10x0020x0130x0240x0350x0460x0570x0680x0790x08100x09110x0A120x0B130x0C140x0D150x0E160x0FOne line: 0x00–0x0F, cursor command 0x80On the split type, text written after character 8 goes to hidden address 0x08: send 0xC0 to continue.
Figure: DDRAM addresses on split and linear 16×1 modules. The duty ratio in the datasheet tells you which type you have.

8×1 Modules

An 8×1 is the smallest common character format. One controller drives it directly in 1-line mode, and it is the format where the HD44780’s optional 5×10 dot font is most useful, because taller characters improve readability on a short line. The 5×10 font is available only in 1-line mode: function set 0x34 in 8-bit mode or 0x24 in 4-bit mode. Typical uses are compact meters, timers and single-value readouts. If the content is only digits and fixed symbols, a segment LCD may be cheaper and easier to read.

40×2 Modules

A 40×2 shows 80 characters, exactly the controller’s display memory, so there is no hidden area beyond the visible line. On narrower displays, each line still has 40 memory positions and the display shift command scrolls the visible window; on a 40×2 the window already covers the whole line, so scrolling text is better done by rewriting it in firmware.

  • Wide outline: check the mounting holes, bezel opening and connector position on the drawing, because a long glass is more sensitive to uneven support.
  • Backlight: a longer LED backlight draws more current than on a 16×2; check the supply budget.
  • Typical uses: office and test equipment, terminals and panels that show a full sentence or several values per line.

Choosing A Character Format

  1. Write the longest message the product must show and count the characters and lines.
  2. Check the readable character height at the viewing distance; the same format comes in different outlines and character sizes.
  3. Confirm the controller, duty and address map in the module datasheet, especially for 16×1.
  4. Check the interface: 4- or 8-bit parallel, or a serial adapter. See UART serial LCDs and baud rate.
  5. Choose the LCD mode and backlight for the lighting; see monochrome LCD types.

The SuccessLCD S4132D 20 × 4 character glass reference is driven at 1/16 duty and 1/5 bias. A 20×4 is electrically two 40-character lines folded onto four rows, which is why it uses the same duty as a 2-line display.

16×1, 8×1 And 40×2 Character LCD FAQs

Why does my 16×1 LCD only show 8 characters?

It is probably the split type, wired as two 8-character halves. Initialize the controller in 2-line mode and write characters 9 to 16 starting at address 0x40, using the command 0xC0.

What is the address of the second half of a 16×1 LCD?

On a split 16×1, the right half starts at DDRAM address 0x40, set with the command 0xC0. On a linear 16×1, all 16 characters are at 0x00 to 0x0F.

How do I initialize an 8×1 LCD?

Use 1-line mode: function set 0x30 in 8-bit mode or 0x20 in 4-bit mode with a 5×8 font, or 0x34 and 0x24 for a 5×10 font. Then display on, clear and entry mode as for any HD44780-type display.

What are the line addresses of a 40×2 LCD?

Line 1 is 0x00 to 0x27 and line 2 is 0x40 to 0x67, which uses all 80 characters of the controller’s display memory.

Can one HD44780 controller drive a 16×2 LCD alone?

The original HD44780 has 40 segment outputs, enough for 8 characters per line, so 16×2 and wider modules add extension drivers or use a compatible controller with more outputs. The command set and addresses stay the same.

Need an 8×1, 16×1 or 40×2 character LCD? Send the format, character height, outline limits, interface, LCD mode and backlight color. Send your requirements for an engineering review, or browse monochrome LCD and LCM references. For a non-standard format, see custom LCD modules.

Scroll to Top
Get a QuoteWhatsApp