Sunday, April 6, 2025

It's all about the LCD

I have made a library for driving a glass LCD, which is a display without a chip, and so I'm writing this article in the hope it will help those who will make use of the library and also everyone else who wants to know about liquid crystal displays and how to select one for their project. This is mostly from a few application notes that will be included in the links section if you want to go into more details.

Contents

 

Basics of LCD panel

The Liquid Crystal Display (LCD) is a thin layer of “Liquid Crystal Material” deposited between two plates of glass. The raw LCD is often referred to as “glass”. Electrodes are attached to both sides of the glass. One side is referred to as common or backplane, while the other side is referred to as segment.

Liquid Crystals (LCs) exist in a state between isotropic (liquid) and crystalline (solid), and exhibit the properties of both. Nematic phase, which is the simplest of the LC phases, is the one employed in the LCD technology.

Liquid crystal phases
Liquid crystal phases (AN658 from Microchip)

LCs are affected by electric current and when a voltage is applied, they react and may change order and arrangement. This unique behavior of LCs allows them to play a significant role in electro-optic devices, such as the LCD.

Basic LCD panel construction
Basic LCD panel construction (AN658)

An LCD produces an output display by switching segments or pixels between ON or OFF. A pixel is considered to be ON when enough electric potential is applied between the segment and common electrodes, resulting to a dark pixel on the display. On the contrary, a pixel is considered to be in the OFF state when insufficient electric potential is applied between the electrodes, creating a clear pixel on the display.

The two most common types of LCDs are: “Twisted Nematic” (TN) and “Super Twist Nematic” (STN). The TN is used for LCD glass with less than 16 backplanes, while STN LCDs are capable of having as much as 240 backplanes. The limitations are due to the decrease in transparency as more backplanes are added.

For more in-depth information about the LCD technology, I recommend reading AN658 from Microchip.

LCD interface

 

Raw LCD also known as glass

The most basic display that doesn't have a driver IC. It is cheaper but needs an external driver.

Chip-On-Glass (COG) display

Like the name suggests, these displays have the chip driver embedded in glass and offers a thin profile.

LCD modules

The LCD modules are the most popular among the hobbyist community since they have build-in driver circuitry that simplifies use at the cost of thicker display and a bit more pricier.

Example of LCD module
Example of LCD module

LCD interconnections

The tracks leading to the edge of the glass allow the LCD to be connected to a microcontroller. Several methods can be used to enable this connection:

Fixed pins

Clipped to the edge of the glass, fixed with conductive glue and sealed with epoxy, fixed pins offer a very stable and low-cost connection method that is recommended for most applications. The pins can be soldered directly to a PCB or fitted to a suitable interface connector.

LCD display with fixed pins

Elastomeric connectors

Elastomeric connectors, also known as ZEBRA connectors, consist of alternating conductive and insulating regions in a special rubber. These connects the conductive traces on the LCD glass with pads on a PCB using press-fit.

Flat flex cable

A flexible ribbon cable is connected to the display using conductive glue and heat, having the benefit of a very thin display profile. These can also contain a driver chip on the flex cable called Chip-On-Flex (COF) or sometimes Tape-Automated Bounding (TAB).

LCD illumination

The rear-side display polarizer has a reflective coating to match the required illumination mode:

Reflective

A reflective coating allows viewing in ambient light. Offer a good contrast but they need an external light source. Cannot be used with a backlight however a light could be used mounted on a side as it can be found in some watches. Often used in portable devices such as calculators or watches where a permanent backlight would draw too much power.

Transmissive

The back polarizer is left clear and the display must be illuminated from behind. Common in TVs where a backlight is always present and power consumption is not as critical as in portable devices.

Transflective

A thin reflective coating offers sufficient reflection for viewing by ambient light and allows backlighting to shine through, so the display can be used in dim conditions. Can be viewed with both ambient light and backlighting. Used in multimeters for example. 

Types of display notation

The other method of classifying LCD panels is the type of display notation used.

Segment displays

Segment Displays are usually the 7-segment, 14-segment, or 16-segment types used to create numbers and letters. Typical applications of segment displays are in calculators, digital clocks, gas station pump readouts, and other displays which do not require much detail.

Segment display type
Segment display type

Dot matrix

Dot matrix displays are always multiplex type displays due to the increased number of pixels required and the pin limitations of most LCD drivers. The higher number of pixels available on a dot matrix display can create more natural letters, numbers, or even custom graphic symbols.

Example of dot matrix LCD
Example of dot matrix LCD

Function indicator or Icon

The third type of display is most commonly used in conjunction with both segmented displays and dot matrix displays. A function indicator or icon provides status information about the system, and they are only capable of being turned on or off. These can be a temperature symbol, a volume or speaker, etc.

Driving raw LCD

When the display doesn't have an integrated driver chip, an external one is needed. This can be a dedicated display driver or a microcontroller that has build-in hardware to drive an LCD. If both options don't fit your needs then you can make your own driver using a microcontroller. When selecting a display driver you need to choose one that can support at least the number of COM and segments that your display needs. When using a microcontroller with a dedicated display driver, be aware that the segment and COM pins can share the same pins with peripherals such as ADC, UART, I2C. First you should check the pin mapping and see if it suits your design requirements.

Driver voltages

Driving an LCD needs to fulfill the following requirements:

- Driving using an AC waveform so the maximum average DC voltage across a COM and a segment should not be more than 60-100mV. This can be measured with a multimeter in DC mode.

- The RMS voltage for turning ON a segment needs to be at least the Von specified in the datasheet. This can be measured with a multimeter in AC mode.

The number one cause of LCD damage is having a DC voltage applied to it. A DC voltage will deteriorate the LC fluid such that it cannot be energized. The LCD driver waveforms are designed to create a 0 VDC potential across all pixels. The specifications for an LCD panel will include some RMS voltages such as VOFF and VON. A third voltage is VTH which is the RMS voltage across an LCD pixel when contrast reaches a 10% level. Often, this voltage is used as VOFF. VON is defined as the RMS voltage applied by the LCD driver to the segment electrode that creates an ON pixel which is typically at the 90% contrast level.

LCD contrast vs RMS voltage

Tip: if you notice any ghosting, one of the reasons could be the voltage is higher than the recommended voltage for that particular display. Ghosting is when some OFF segments are visible.

Capacitance

The LCD panel can be modeled as a lossy, non-linear capacitor. The area of the pixel, and therefore the size of the LCD panel, has a direct impact on the value of the capacitance that a common or segment driver must be able to drive. Typical values of capacitance are in the range of 1000 - 1500 pF/cm2.

Care must be taken when designing a system such that the LCD driver is capable of driving the capacitance on the segment and common. Otherwise, the LCD panel may be damaged due to a DC offset voltage generated by overloaded segment and common drivers.

LCD capacitor model
Equivalent circuit

Static vs Multiplex drive

Static

Direct drive also known as static, means that each segment of the LCD panel is connected to a single pin and there is only one common. A static drive panel also has static bias. Bias is defined as the number of voltage levels the LCD driver uses to create images on the screen. Static bias refers to two voltage levels which create a square wave: ground and VDD. Static drive panels also have the best contrast ratios over the widest temperature range. They are the easiest to drive but they are only found on displays with only a few digits. More complex displays need more than one common that requires multiplexing.

Multiplex

Multiplex drive panels reduce the number of pins. By utilizing more than one common, a multiplex LCD driver produces an amplitude-varying, time synchronized waveform for both the segment and commons. These waveforms allow access to one pixel on each of the commons. This significantly increases the complexity of the driver. The number of commons a panel has is referred to as the multiplexing ratio or the “MUX” of the panel. MUX also refers to duty cycle. For instance, a 1/3 MUX panel has three commons. The bias for multiplex panels is at least 1/2—1/5 for segment type drivers and from 1/8—1/33 for dot matrix.

Frame rate

The number of times the LCD segments are energized per second is called the LCD frame rate. The frame rate should be kept above 30 Hz to avoid flickering.

If a high frame rate is used, ghosting can occur. Ghosting is when LCD segments are not properly turned off. This effect also depends on Duty and Bias (explained below), and it may be necessary to adapt the frame rate to the actual Duty and Bias used. In general, ghosting can be avoided by using sufficiently low frame rates. A frame rate of 100 Hz prevents ghosting.

Lowering the LCD frame rate will decrease the power consumption. In low power applications (e.g. battery applications) the frame rate could be less than 30Hz as long as the display contrast/flickering is satisfying for the given application. 

Discrimination Ratio

The contrast of an LCD can be determined by calculating the discrimination ratio. Discrimination ratio (D) is the ratio between the RMS voltage of an ON pixel with the RMS voltage of an OFF pixel, as defined by Equation 1.

LCD discrimination ratio formula

Higher multiplex ratios of the LCD result in a lower discrimination ratio, and therefore the lower the contrast of the display. 

Table 8 shows the VOFF, VON and discrimination ratios of the various combinations of MUX and bias. This table also shows that as the multiplex of the LCD panel increases, the discrimination ratio decreases and in turn, the contrast of the panel will also decrease. In order to provide better contrast in these types of situations, the LCD voltages must be increased to provide greater separation between each level.

Discrimination ratio vs MUX and Bias
AN658

Segments Drivers and Common Terminals

Each LCD segment has two terminals. One is connected to a segment driver, and the other is connected to a common terminal. By applying an alternating current across the segment driver and the common terminal, the liquid crystal is polarized (energized) and becomes visible. The common terminal is, as the term implies, common for a group of LCD segments.

Static drive

In the following example there are two segments both connected to one common but there could be more segments. This is called static drive because there is only one common (backplane) so no multiplexing is needed.

Two LCD Segments Connected to One Common Terminal
Two LCD Segments Connected to One Common Terminal (from AVR065)

Assuming we want to turn on segment 0 and keep off segment 1, the driver will produce the following waveform.

Driving Waveforms for Two LCD Segments Connected to the Same Common Terminal
Driving waveforms for two LCD segments connected to the same
common terminal (AVR065)

The left side shows the active segment driving waveforms and the right side shows the inactive segment driving waveforms. Beneath each of them is the voltage across the COM and the segment. When COM0 is GND the ON segment SEG0 is at opposite polarity (VCC) and SEG1 is GND with same polarity as the COM to keep the segment OFF. This results in a maximal voltage drop over the segment that should be energized, and no or a small voltage drop over the segments that should not be energized. Having the same polarity is called in-phase and out-of-phase if the segment polarity is opposite of that of the COM. 

Static drive waveform

After all COMs goes through high and low phases, the frame is complete.

Duty Cycle or Duty Ratio

The Duty Cycle or Duty Ratio is a number used to describe for how long each segment is activated during each frame. When there is only one common the Duty Ratio is “static”. If more than one common is present, the Duty Ratio is given as 1/commons. The Duty Ratio is therefore depending on the number of common terminals in a given LCD glass.

LCD Segments Controlled by Using One or Three Common Terminals

Drive Bias

The Drive Bias (or just Bias) is related to the number of voltage levels used when driving the LCD. The Bias is defined as 1/(number of voltage levels-1). The more segments driven by each driver, the higher the number of voltage levels is required. The number of segments driven by a single segment line is depending on the number of back-planes in the LCD glass. As per the definition of Duty Ratio, there is a direct relation between the Bias required and the Duty Ratio used.

Display Duty, Bias and Voltage Levels
AVR065 page 4
Next is the driving waveforms of two LCD segments driven by the same segment line and connected to two different back-planes. The illustration shows that the driving waveform has four voltage levels, Bias of 1/3, which is sufficient to drive up to six back-planes. However since the waveform shows three cycles within one frame the Duty is 1/3 and indicating that the glass has three back-planes.
Driving Waveforms of Two Different LCD Segments
Driving Waveforms of Two Different LCD Segments (AVR065)

Above figure shows driving waveforms of two different LCD segments connected to two different common terminals. The segment line is shared. The segment represented by the right side figure is inactive because the LCD activation voltage threshold is not passed.

Multiplexing

The multiplex driving method reduces the number of I/O. The method of drive for multiplexed displays is Time Division Multiplex (TDM) with the number of time divisions equal to twice the number of common planes used in a given format. In order to prevent permanent damage to the LCD display, the voltage at all segment locations must reverse polarity periodically so that zero net voltage is applied. This is the reason for the doubling in time divisions; each common plane must be alternately driven with a voltage pulse of opposite polarity. The drive frequency should be greater than the flicker rate of 25 Hz. Since increasing the drive frequency significantly above this value increases current demand by the CMOS circuitry, an upper drive frequency level of 60 Hz is recommended by most LCD manufacturers. A drive rate of 50 Hz results in a frame period of 20 ms.

LCD waveform for 2 commons
LCD waveform for 2 commons (AN563)

LCD waveform type

LCDs can be driven by two types of waveforms: Type A or Type B. When driving an LCD panel with a Type-A waveform, the phase changes within each common type. When driving an LCD panel with a Type-B waveform, the phase changes on each frame boundary. This means that Type-A waveforms maintain 0 VDC over a single frame, while Type-B waveforms need two frames to maintain 0 VDC.

Type-B waveforms in 1/8 MUX, 1/3 bias drive
Type-B waveforms in 1/8 MUX, 1/3 bias drive (AN658)

Type-A waveforms in 1/8 MUX, 1/3 bias drive
Type-A waveforms in 1/8 MUX, 1/3 bias drive (AN658)

According to AN658, page 32, the two waveform types resulted into the same value of discrimination ratio.

Why multiplexed waveforms are so complex

You might wonder why so many voltage levels. Why not use only VCC and GND. I believe the main reason is that an LCD segment is like a capacitor and they are connected in a grid fashion. If you are familiar with LED displays, you probably know they can be driven with only two voltage levels, but there the advantage is they behave like diodes, so when the voltage is applied in reverse you don't have to worry about the LED lighting up. With LCD segments this is an issue because they can and must be activated from both sides by inverting the polarity and that without creating a sufficient voltage across the inactive segments.

A small voltage across the off segments is unavoidable; the better the driver and the more voltage levels are used, better the contrast (discrimination ratio). Ideally the voltage of active segments should be the maximum necessary and the off segments should have zero voltage RMS.

Following is an example of one digit from HTC-1 clock display. It shows the connections of each segment to the four COMs (or backplanes).

Example of LCD segments and backplanes connections

Since this is multiplexed (1/4 MUX), each COM will be activated in order. If a segment is active for a particular COM it will have the opposite polarity for a maximum voltage difference while the inactive segments will have same polarity as the COM.

Suppose we want to activate segment A on SEG12 and COM0, segments A, B, C, D will be affected by SEG12 so rest of the COMs will have to have a voltage level so that the difference will not activate rest of the segments. COM0 also affects segment F and also E and G that are in series. Hopefully you can see now why the need for multiple voltage levels and complex waveforms.

I have made a spreadsheet in Libre Office that you can use to try different combinations of voltages used to generate a waveform.

LCD calculator for DC, RMS, waveforms


Columns represent a frame in which each COM is active going from VCC/2 to VCC then from VCC to GND while the rest is at VCC/2 in the idle state. SUM is the average DC and should be 0.

In the next article I will be showing you how to drive an LCD using a microcontroller.

Links

LCD calculator v1.0 

Documentation

Following application notes where used. These can be found using a search engine.

  • AN658 - LCD Fundamentals and the LCD Driver Module of 8-Bit PIC Microcontrollers, Microchip
  • AVR241 - Direct driving of LCD display using general IO
  • AVR065 - LCD Driver for the STK502
  • AN563 - Using PIC16C5X Microcontrollers as LCD Drivers, Microchip

External Links

EEVblog #1044 - LCD Technology Tutorial

EEVblog #1045 - How To Drive an LCD

EEVblog #1055 - How to Design a Custom LCD- µSupply Part 16

No comments:

Post a Comment