LCD Technical FAQ


[Document Version: 40B] [Last Updated: September_1996a]

Chapter 1) Introduction

  1.1) About the Author


Author: Christopher J. Burian
Subject: LCD [technical] FAQ
Version: 40B
Date: September 1996

The LCD MODULE TECHNICAL REFERENCE (FAQ) was compiled and is maintained by Christopher J. Burian. References and other contributors are listed below.

Last change: Version 40 released in May 1996. Various minor changes made in 40a and 40b. Last revision: September 1996.

Errata, comments, and suggestions are most welcome.

  1.2) Acknowledgements

My gratitude to correspondents and contributors Chris Abbott, Richard N. Ames, Magnus Andersson, Ronald S. Chong, Scott Dattalo, John Edwards, Doug Girling, Filip Gieszczykiewicz, Frank Hausmann, John Payson, Robert Rolf, Philipp Schaeufele, J. R. Spidell, Frank Vorstenbosch, Steve Walz, and Brian Wing.

Special thanks and my apologies to any correspondents or contributors whom I might have failed to mention.

  1.3) Trademark & Copyright notice and disclaimer

Copyright 1996 by Christopher J. Burian. All rights reserved. Permission is granted to electronically distribute and reproduce this article in unaltered form provided that it is given free of charge (reasonable connection fees allowed). Written reproduction of this article in whole or in part without the express permission of the author is prohibited (printouts made for personal use excepted).

Trademarks and service marks appearing in this FAQ are the property of their respective owners.

Use this information at your own risk. Contributors cannot be responsible for damage or losses resulting from errors or omissions in this work. Every effort has been made to verify its accuracy.

  1.4) References

References used to generate this version:

My favorite references are the Optrex databook for dot matrix modules, available from Digikey for $2, and the Amateur Robotics column in the June '94 issue of Nuts & Volts magazine, 430 Princeland Court, Corona, CA 91719.


The most recent version is always available from:

 lcdfaq.txt -- faq table of contents -- the latest version of the faq

 contents:  lcdfaq40.txt, chset.gif

This FAQ and many other FAQs and links related to LCDs.

  1.6) History

I originally wrote this frustrated by the terse and cryptic datasheets manufacturers supply. I refer to it more often than I write to it. I hope engineers, hobbyists, students and experimenters find it helpful.

Chapter 2) LCD module basics

  2.1) Legend

        W == ~W

This makes it easier to format for all browsers and text prints.

  2.2) Description

LCDs are manufactured by quite a few different companies. Units typically seen in the surplus market come from Densitron, Epson, Hewlett Packard, Optrex, or Sharp. Common configurations are 16, 20, 24, 32, or 40 characters by 1, 2, or 4 lines.

I've been loose with the term LCD here. One can find LCDs at any level of integration from what looks like a glass slide and will need drivers and controller, to a PCB that includes the row and column drivers, to the modules I'm actually talking about which also include an on-board controller (usually a Hitachi HD44780). I'd recommend staying away from modules that do not say they have a controller or otherwise indicate that it's included, such as by describing the character set or noting an ASCII interface. The units to look for are usually called character-type dot matrix LCD modules.

This article applies only to character-based LCD modules with Hitachi 44780 or equivalent controllers. I have a compatible LCD module made by Epson. The chips don't have any identifying marks, but they are probably made by Seiko or SMOS. The protocol and pinout are identical, but the non-ASCII characters (>127) are different.

All of the modules I've seen use the Hitachi controller, or a functional equivalent or near equivalent. Each of these use the same interface and memory map. The character set is almost always the same with a mixture of English and Japanese characters, but models with different character sets turn up in the surplus market, for instance, substituting Latin and German characters for Japanese characters.

Also found are modules with extra segments--fixed numbers or words arranged around the dot matrix display area for extra functions. To the controller, these extra segments look just like an additional 5x7 dot box (each segment (word, digit, etc.) corresponds to one dot) and can be driven by defining custom characters with appropriate bit patterns to energize these special segments as desired.

Experimenters interested in graphical LCD displays can find units with and without onboard controllers. Those without controllers are more common and are often called "serial interface" graphical LCDs. Units without controllers must be refreshed continually, consuming a great deal of processor time if an external controller isn't added. Units with built-in controllers have onboard video RAM, automatic refresh, and character and graphics commands. An introduction to making your own external controller based on an FPGA appears in the form of a class assignment at: This article doesn't discuss graphical type modules.

If you're interested in the basic principles behind operation of Liquid Crystal Displays, take a look at Scott M. Bruck's LCD FAQ, which is available from as the file /pub/cookbook/faq/LCD2.doc Since his FAQ came first, I've changed the name of this one to the LCD MODULE TECHNICAL REFERENCE (FAQ).

  2.3) Definitions

Backlit (BL)
Uses lamp behind the display instead of reflected light.

Cold cathode flourescent lamp (CFL)
A special type of flourescent lamp used for backlighting in modern LCD displays, particularly large graphical arrays as used in laptops. They provide excellent illumination at low current. Powered by high voltage and highfrequency AC (200-1000V at 25-75 kHz), their electrical requirements are critical and must be exactly matched with the appropriate inverter recommended by the manufacturer. Example ratings for Stanley CFL backlights: 20 character x 2 line: 230 V, 2.5 mA, 65 kHz; 40 character x 2 line: 340 V, 2.5 mA, 65 kHz; 256 x 128 dot: 7 mA, 25 kHz, no voltage listed.

The on-board dedicated microcontroller, such as the Hitachi HD44780 or SMOS SED1130, which acts as an interface between your CPU and the row and column drivers. It may have on-chip ram, or may need external ram. The controller takes care of generating characters, refreshing the display, and so on. The modules discussed in this article have on-board controllers with internal ram.

LCD modules of all sorts have column and row, or x and y, drivers. To control a module with just drivers directly from a CPU would take a great deal of time and software overhead, because each bit (dot) has to be written separately, usually 4 bits at a time, in a non-stop cycle.

Electroluminescent lamp (EL)
A kind of lamp used for backlighting that gives off a cool glow, powered by high voltage, mid-frequency AC (about 100V at 400Hz) from a dc-ac inverter. Listed ratings for Stanley EL backlights: 50-250 V, 50-1000 Hz; typical: 82 V, 410 Hz. Ignore the 50 Hz lower rating for frequency, it might tempt you to try to power it off house current. Luminance at 50 Hz is only about 1/10 of luminance at 400 Hz. I smoked an EL backlight powering it with mains voltage with a series potentiometer, in other words at less than 120 V, despite a supposed 250 V rating.

Extended temperature
Modules designed for use in temperatures outside the standard range. Standard range is 0 to 50 C, extended range is -20 to 70 C. Extended range units need -7VDC as well as +5VDC. Standard range units need only +5VDC. See discussion of Vee. Extended temperature range units are useful for outdoor use and for LED backlit units (these get rather warm).

Liquid crystal display

Light emitting diode, the other popular backlight, requiring low voltage DC, but a real current hog compared to the other backlights. Example ratings: 16 x 1, 16 x 2: 160 mA at 4.5 V; 16 x 4: 240 mA at 4.5 V; 20 x 4: 300 mA at 4.5 V. Max current is 150% of rated current. These backlights are driven like any other LED, the series resistor Rs = (Vbat - Vf) / If, for example: Rs = (12 - 4.5) / .160 = 47 ohms. In general, for oneor two-line displays, If = 10 x #chars/line milliamps, and for four-line displays, If = 15 x #chars/line milliamps; all at 4.5 volts.

Supertwist (STN)
A design that improves contrast and viewing angle.

  2.4) Sources for modules

These are the sources in the USA I've seen that are most accessible to the hobbyist. If you know of more, please email me.

In the UK:

In Canada:

Chapter 3) Specifications

  3.1) Pin Description

These numbers are the same no matter the physical arrangement of the pins, (for instance, a row along the top on Optrex units, or a 2x7 .100" center array on the side of Sharp units) on 14-pin units. A reader has noted modules with only 10 pins--designed to be used with 4-bit wide data only.

Pin#  Symbol  Level  Function
====  ======  =====  ==================================================
 1     Vss     GND    Ground
 2     Vcc     +5V    Module power
 3     Vee    note1   Liquid crystal drive
 4     RS      H/L    Register select, H=data, L=instruction
 5     R/~W    H/L    Read/Write, H=read (LCD->CPU), L=write (CPU->LCD)
 6     E      note2   Edge-sensitive Enable
 7     DB0    note3   Data bit 0  (least significant bit)
 8     DB1      "
 9     DB2      "
10     DB3      "
11     DB4      "
12     DB5      "
13     DB6      "
14     DB7      "

Backlight drive: If the module has a back light, it will be driven by a pair of pads separate from the interface pads. Check your datasheet for power requirements.

NOTE1: On standard modules Vee is between GND and 5V; on temperature extended modules it is between GND and -7V. A potentiometer, resistor arrangement, or resistor-diode arrangement is used for contrast adjustment. Wiring examples for using a potentiometer are shown here.


          +5V ------------*----------- Vcc
                  10k to  \<---------- Vee
                  20k pot /
          GND ------------*----------- Vss

Temperature extended model:

          +5V ------------------------ Vcc

          GND ------------*----------- Vss
                  10k to  \<---------- Vee
                  20k pot /
          -7V ------------'

Extended temperature types may also employ temperature correction circuitry to provide automatic contrast adjustment.

For operation over a narrow temperature range (such as always indoors), a pair of resistors can be substituted for the potentiometer. At first, try a 10Kohm resistor between Vcc and Vee, and a 330ohm resistor between Vee and Vss (ground), and adjust from there for optimum contrast. Also, a forward-biased diode is sometimes used between Vee and Vss, instead of the low-ohm resistor.

For testing purposes, Vee can be tied to ground, but the digits will be invisible at the normal perpendicular viewing angle. Tilt the display until your view is almost in the plane and the display will be faintly readable.

NOTE2: Enable latches RS and R/W on the rising edge and clocks data on the trailing edge. According to specs, RS and R/W must be stable before E goes high and must remain stable until E goes low (observing setup and hold times). Data must be stable while E goes low (again, observing setup and hold times).

NOTE3: The data pins DB7-DB0 (or DB7-DB4 when using a 4-bit interface) need to be driven by the CPU for a write, but must be switched to hi-Z (or pulled up with pull-up resistors only) so the module can drive the lines on a read or BUSY FLAG check.

When using a 4-bit wide interface, the most significant nybble is written first (bit7-bit4), then the least significant nybble is written (bit3-bit0) on the next Enable cycle. DB3 to DB0 are left unconnected. The pins have internal pullups, so unused pins can be left unconnected, but I don't know whether the pullups are sufficient to use open collector drivers. The pullup resistors may be too high resistance to overcome line capacitance at high speeds.

Power consumption: Modules use between 10 and 25mW (2 to 5 mA), not counting the backlight, roughly proportional to the product of rows and columns.

Be careful when hooking power to the module. Reversing +5V and GND will destroy the unit. Carefully examine your datasheet to correctly identify Pins 1 and 2. On the 2x7 pin units, pins 1 & 2 (on the bottom) are paired, up through 13 & 14 at the top.

Please check attribution section for Author of this document! This article was written by [mailto]. The most recent version is available on the WWW server [Copyright] [Disclaimer]