Saturday, February 28, 2015

LCD:What It Does,How It Works,Variants,Active and Passive Types,Crystal Types,Seven-Segment Displays,Additional Segments,Dot-Matrix Displays,Color,Backlighting Options,Zero-Power Displays,How to Use It,Numeric Display Modules and Alphanumeric Display Module.

LCD

The full term liquid-crystal display is seldom used. Its acronym, LCD, is much more common. Sometimes the redundant combination LCD display is found. All three terms refer to the same device. In this encyclopedia, the first two words in liquid-crystal display are hyphenated because they are an adjectival phrase. Other sources often omit the hyphen.

The acronym LED (for light-emitting diode) is easily confused with LCD. While both devices display information, their mode of action is completely different.

What It Does

An LCD presents information on a small display panel or screen by using one or more segments that change their appearance in response to an AC voltage. The display may contain alphanumeric characters and/or symbols, icons, dots, or pixels in a bitmap.

Because of its very low power consumption, a basic monochrome LCD is often used to display numerals in battery-powered devices such as digital watches and calculators. A small liquid- crystal display of this type is shown in Figure 17-1.

Color-enabled, backlit LCDs are now frequently used in almost all forms of video displays, including those in cellular telephones, computer monitors, game-playing devices, TV screens, and air- craft cockpit displays.

How It Works

Light consists of electromagnetic waves that possess an electric field and a magnetic field. The fields are perpendicular to each other and to the direction in which the light is traveling, but the field polarities are randomly mixed in most visible radiation. This type of light is referred to as incoherent.

clip_image006

Figure 17-1. A small, basic monochrome LCD.

Figure 17-2 shows a simplified view of an LCD that uses a backlight. Incoherent light emerges from the backlight panel (A) and enters a vertical polarizing filter (B) that limits the electric field vector. The polarized light then enters a liquid crystal (C) which is a liquid composed of molecules organized in a regular helical structure that rotates the polarity by 90 degrees when no volt- age is applied to it. The light now passes through

a horizontal polarizing filter (D) and is visible to the user.

clip_image008

Figure 17-2. The combination of two polarizers and a liquid crystal appears transparent when voltage is not applied. See text for details.

• A liquid crystal itself does not emit light. It can only modify light that passes through it.

Figure 17-3 shows what happens when voltage is applied to the liquid crystal via transparent electrodes (not included in the figure). The molecules reorganize themselves in response to the electric potential and allow light to pass without changing its polarity. Consequently, the vertically polarized light is now blocked by the front, horizontally polarized filter, and the display be- comes dark.

A liquid crystal contains ionic compounds that will be attracted to the electrodes if a DC voltage is applied for a significant period of time. This can degrade the display permanently. Therefore, AC voltage must be used. An AC frequency of 50Hz to 100Hz is common.

clip_image010

Figure 17-3. The LCD appears dark when voltage is applied. See text for details.

Variants

A transmissive LCD requires a backlight to be visible, and is the type illustrated in Figure 17-2. In its simplest form, it is a monochrome device, but is often enhanced to display full color by adding red, green, and blue filters. Alternatively, instead of a white backlight, an array of pixel-sized red, green, and blue LEDs may be used, in which case filters are unnecessary.

Backlit color LCDs have displaced cathode-ray tubes, which used to be the default system in al- most all video monitors and TVs. LCDs are not only cheaper but can be fabricated in larger sizes. They do not suffer from burn in, where a persistent unchanging image creates a permanent scar in the phosphors on the inside of a tube. How- ever, large LCDs may suffer from dead pixels or stuck pixels as manufacturing defects. Different manufacturers and vendors have varying policies regarding the maximum acceptable number of pixel defects.

In a reflective LCD, the structure is basically the same as that shown in Figure 17-2 except that a reflective surface is substituted for the backlight. Ambient light enters from the front of the display, and is either blocked by the liquid crystal in combination with the polarizing filters, or is allowed to reach the reflective surface at the rear, from which it reflects back through the liquid crystal to the eye of the user. This type of display is very easily readable in a bright environment, but will be difficult to see in dim conditions and will be invisible in darkness. Therefore, it may be augmented with a user-activated light source mounted at the side of the display.

A transreflective LCD contains a translucent rear polarizer that will reflect some ambient light, and is also transparent to enable a backlight. While this type of LCD is not as bright as a reflective LCD and has less contrast, it is more versatile and can be more energy efficient, as the backlight can be switched off automatically when ambient light is bright enough to make the display visible.

Active and Passive Types

An active matrix LCD adds a matrix of thin-film transistors to the basic liquid-crystal array, to store the state of each segment or pixel actively while the energizing AC voltage transitions from positive to negative. This enables a brighter, sharper display as crosstalk between adjacent pixels is reduced. Because thin-film transistors are used, this is often described as a TFT display; but the term is interchangable with active matrix.

A passive matrix LCD is cheaper to fabricate but responds sluggishly in large displays and is not so well suited to fine gradations in intensity. This type of component is used primarily in simple monochrome displays lacking intermediate shades of gray.

Crystal Types

Twisted Nematic (TN) are the cheapest, simplest type of LCD, allowing only a small viewing angle and average contrast. The appearance is limited to black on gray. The response rate is relatively slow.

Super Twisted Nematic (STN) displays were developed in the 1980s for passive LCDs, enabling better detail, wider view angle, and a faster response. The natural appearance is dark violet or black on green, or dark blue on silver-gray.

Film-compensated Super Twisted Nematic (FSTN) uses an extra coating of film that enables a pure black on white display.

Double Super Twisted Nematic provides further enhancement of contrast and response times, and automatic contrast compensation in response to ambient temperature. The appearance is black on white. This display requires backlighting.

Color Super Twisted Nematic (CSTN) is an STN dis- play with filters added for full color reproduction.

Seven-Segment Displays

The earliest monochrome LCDs in devices such as watches and calculators used seven segments to display each numeral from 0 through 9. This type of LCD is still used in low-cost applications. A separate control line, or electrode, connects to each segment, while a backplane is shared by all the segments, connecting with a common pin to complete the circuit.

Figure 17-4 shows a typical seven-segment dis- play. The lowercase letters a through g that identify each segment are universally used in data- sheets. The decimal point, customarily referred to as “dp,” may be omitted from some displays. The array of segments is slanted forward to en- able more acceptable representation of the diagonal stroke in numeral 7.

clip_image012

Figure 17-4. Basic numeric display format for LCD numeric displays (the same layout is used with LEDs). To identify each segment, lowercase letters are universally used.

Seven-segment displays are not elegant but are functional and are reasonably easy to read, as shown in Figure 17-5. Letters A, B, C, D, E, and F (displayed as A, b, c, d, E, F because of the restrictions imposed by the small number of segments) may be added to enable display of hexadecimal values.

In appliances such as microwave ovens, very basic text messages can be displayed to the user within the limitations of 7-segment displays, as suggested in Figure 17-6.

The advantage of this system is low cost, as 7- segment displays are cheap to fabricate, entail the fewest connections, and require minimal de- coding to create each alphanumeric character. However, numbers 0, 1, and 5 cannot be distinguished from letters O, I, and S, while letters containing diagonal strokes, such as K, M, N, W, X, and Z, cannot be displayed at all.

clip_image014

Figure 17-5. Numerals and the first six letters of the alphabet created with a 7-segment display.

Additional Segments

Alphanumeric LCDs were developed using 14 or 16 segments to enable better representation of letters of the alphabet. Sometimes these displays were slanted forward, like the 7-segment dis- plays, perhaps because the style had become familiar, even though the addition of diagonal segments made it unnecessary. In other cases, the 14 or 16 segments were arrayed in a rectangle. See Figure 17-7.

The same words represented in Figure 17-6 are shown in Figure 17-8, using 16-segment LCDs. Clearly, the advantage gained by enabling diagonal strokes entailed the disadvantage of larger gaps in the letters, making made them ugly and difficult to read.

 

clip_image018Figure 17-6. Basic text messages can be generated with 7-segment displays, although they cannot contain alphabetical letters that use diagonal strokes.

A full character set using 16-segment LCDs is shown in Figure 17-9. This conforms partially with the ASCII coding system, in which each character has an identifying numeric code ranging from 20 hexadecimal for a letter-space to 7A hexadecimal for letter z (although this character set does not attempt to represent lowercase letters differently from uppercase). The ASCII acronym stands for American Standard Code for Information Interchange.

Because backlit LCDs had become common by the time 16-segment displays were introduced, the characters were often displayed in light-on- dark or “negative” format, as suggested in this figure. LEDs, of course, have always used the light-on-dark format, as an LED is a light-emitting component.

clip_image016

Figure 17-7. LCDs using 14 segments (left) and 16 segments (right) were introduced to represent a full alphabet in addition to numerals. Sometimes these displays were slanted forward, like the previous 7-segment type, even though this was no longer necessary to represent the number 7.

Dot-Matrix Displays

The 16-segment displays were never widely popular, and the declining cost of microprocessors, LCD fabrication, and ROM storage made it economic to produce displays using the more easily legible 5x7 dot-matrix alphabet that had been common among early microcomputers. Figure 17-10 shows a dot-matrix character set that is typical of many LCDs.

Because the original ASCII codes were not standardized below 20 hexadecimal or above 7A hexadecimal, manufacturers have represented a variety of foreign-language characters, Greek letters, Japanese characters, accented letters, or symbols using codes 00 through 1F and 7B through FF. The lower codes are often left blank, allowing user installation of custom symbols. Codes 00 through 0F are often reserved for control functions, such as a command to start a new

line of text. There is no standardization in this area, and the user must examine a datasheet for guidance.

clip_image022

Figure 17-8. The same text messages shown previously using 7-segment LCDs are shown here using 16-segment displays.

Dot-matrix LCDs are usually packaged in arrays consisting of eight or more columns and two or more rows of characters. The number of columns is always stated before the number of rows, so that a typical 8 x 2 display contains eight alpha- numeric characters in two horizontal rows. An array of characters is properly referred to as a display module, but may be described, confus- ingly, as a display, even though a single seven- segment LCD is itself a display. A 16x2 display module is shown from the front in Figure 17-11

and from the rear in Figure 17-12.

clip_image020

Figure 17-9. A full character set using 16-segment LCDs.

clip_image024

Figure 17-10. A dot-matrix character set typical of LCDs capable of displaying a matrix of 5×7 dots.

clip_image026

Figure 17-11. A 16x2 LCD display module seen from the front.

clip_image028

Figure 17-12. The same 16x2 LCD display module from the previous figure, seen from the rear.

Multiple-character display modules have been widely used in consumer electronics products such as audio components and automobiles where simple status messages and prompts are necessary—for example, to show the volume setting or broadcast frequency on a stereo receiver. Backlighting is almost always used.

Because the cost of small, full-color, high- resolution LCD screens has been driven down rapidly by the mass production of cellular phones, color displays are likely to displace monochrome dot-matrix LCD display modules in many applications. Similarly, touchscreens will tend to displace pushbuttons and tactile switches. Touchscreens are outside the scope of this encyclopedia.

Color

The addition of filters to create a full color display is shown in simplified form in Figure 17-13.

clip_image030

Figure 17-13. The addition of red, green, and blue color filters, in conjunction with variable density liquid crystal pixels, enables an LCD full-color display.

Red, green, and blue are almost always used as primary colors for transmitted light, because the combination of different intensities of these RGB primaries can create the appearance of many colors throughout the visible spectrum. They are said to be additive primaries, as they create brighter colors when they are combined. The principle is illustrated in Figure 17-14.

The use of the word “primaries” to refer to red, green, and blue can cause confusion, as full-color printed materials use a different set of reflective primaries, typically cyan, magenta, and yellow, often with the addition of black. In this CMYK system, additional layers of pigment will absorb, or subtract, more visible frequences. See Figure 17-15.

clip_image032

Figure 17-14. When colors red, green, and blue are trans- mitted directly to the eye, pairs of these additive primaries create secondary colors cyan, magenta, and yellow. Combining all three additive primaries creates an approximation of white light. This can be verified by viewing a color monitor with a magnifying glass.

clip_image034

Figure 17-15. When ink colors cyan, magenta, and yellow are superimposed on white paper and are viewed in white light, pairs of these subtractive primaries create secondary colors red, green, and blue. Overprinting all three subtractive primaries creates an approximation of black, limited by the reflective properties of available pigments. Black ink is usually added to provide additional contrast.

The complete range of colors that can be created as a combination of primaries is known as the gamut. Many different RGB color standards have been developed, the two most widely used being sRGB (almost universal in web applications) and Adobe 1998 (introduced by Adobe Systems for Photoshop, providing a wider gamut). None of the available systems for color reproduction comes close to creating the full gamut that can be perceived by the human eye.

Backlighting Options

For monochrome LCDs, electroluminescent backlighting may be used. It requires very low current, generates very little heat, and has a uniform output. However, its brightness is severely limited, and it requires an inverter that adds significantly to the current consumption.

For full-color LCDs, fluorescent lights were originally used. They have a long lifetime, generate little heat, and have low power consumption. However, they require a relatively high voltage, and do not work well at low temperatures. Early flat screens for laptop computers and desktop monitors used cold-cathode fluorescent panels.

Subsequently, white light-emitting diodes (LEDs) were refined to the point where they generated a range of frequencies that was considered acceptable. Light from the LEDs passes through a diffuser to provide reasonably consistent illumination across the entire screen. LEDs are cheaper than fluorescent panels, and allow a thinner screen.

High-end video monitors use individual red, green, and blue LEDs instead of a white back- light. This eliminates the need for colored filters and produces a wider gamut. So-called RGB LCD monitors are more expensive but are preferred for professional applications in video and print media where accurate color reproduction is essential.

Zero-Power Displays

Some techniques exist to create LCDs that re- quire power only to flip them to and fro between

their transparent and opaque states. These are also known as bistable displays, but have not be- come as widely used. They are similar in concept to e-ink or electronic paper displays, but the principle of operation is different.

How to Use It

So long as an LCD consists of just one numeral, it can be driven by just one decoder chip that translates a binary-coded input into the outputs required to activate the appropriate segments of the LCD. The evolution of multi-digit displays, alphanumeric displays, dot-matrix displays, and graphical displays has complicated this situation.

Numeric Display Modules

An LCD consisting of a single digit is now a rare item, as few circuits require only one numeral for output. More commonly, two to eight numerals are mounted together in a small rectangular pan- el, three or four numerals being most common. A typical digital alarm clock uses a four-digit numeric display module, incorporating a colon and indicators showing AM/PM and alarm on/off. Other numeric display modules may include a minus sign.

Modules that are described as having 3.5 or 4.5 digits contain three full digits preceded by a numeral 1 composed of two segments. Thus, a 3- digit module can display numbers from 000 through 999, while a 3.5-digit display can display numbers from 000 through 1999, approximately doubling the range.

Numeric display modules of the type described here do not contain any decoder logic or drivers. An external device, such as a microcontroller, must contain a lookup table to translate a numeric value into outputs that will activate the appropriate segments in the numbers in a dis- play, with or without decimal points and a minus sign. To avoid reinventing the wheel, a programmer may download code libraries for microcontrollers to drive commonly used numeric display modules. It is important to remember, though,

that segments in monochrome LCDs must be activated by AC, typically a square wave with a frequency of 30Hz to 90Hz.

An alternative is to use a decoder chip such as the 4543B or 4056B, which receives a binary- coded decimal input (i.e., 0000 through 1001 bi- nary, on four input puts) and translates it into an output on seven pins suitable for connection with the seven segments of a 7-segment display. The 4543B requires a square-wave input to its “phase” pin. The square-wave must also be applied simultaneously to the backplane of the LCD, often identified as the “common” pin on datasheets. Pinouts for the 4543B are shown in Figure 17-16.

The 4543B includes provision for “display blanking,” which can be used to suppress leading zeros in a multidigit number. However, the lack of out- puts to control a minus sign or decimal point limits the decoder to displaying positive integers.

clip_image037

Figure 17-16. Pinouts for the 4543B decoder chip, which is designed to drive a seven-segment numeric LCD.

The power supply for a 4543B can range from 5VDC to 18VDC, but because the logic-high out- put voltage will be almost the same as that of the power supply, it must be chosen to match the power requirements of the LCD (very often 5VAC).((( To drive a three-digit numeric display module, a separate decoder chip can be used to control each digit. The disadvantage of this system is that each decoder requires three inputs, so that a three-digit display will require nine outputs from the microcontroller.

To deal with this issue, it is common to multiplex a multi-digit display. This means that each output from the decoder is shared among the same segments of all the LCD numerals. Each LCD numeral is then activated in sequence by applying AC voltage to its common pin. Simultaneously, the decoder sends the data appropriate to that LCD. This process must be fast enough so that all the digits appear to be active simultaneously, and is best managed with a microcontroller. A simplified schematic is shown in Figure 17-17. It can be compared with a similar circuit to drive LED displays, shown in Figure 24-13.

Alphanumeric Display Module

Arrays of dot-matrix LCDs that can display alphabetical characters as well as numerals require preset character patterns (usually stored in ROM) and a command interpreter to process instructions that are embedded in the data stream. These capabilities are often built into the LCD module itself.

While there is no formal or de facto standard, the command set used by the Hitachi HD44780 controller is installed in many displays, and code libraries for this set are available for download from sites dedicated to the Arduino and other microcontrollers. Writing code from scratch to control all aspects of an alphanumeric display is not a trivial chore. The Hamtronix HDM08216L-3- L30S is a display that incorporates the HD44780.

clip_image039

Figure 17-17. When two or more numeric displays are multiplexed, a control device (typically, a microcontroller) activates each of them in turn via its backplane (common terminal) while sending appropriate data over a shared bus.

Regardless of which standard is used, some features of alphanumeric display modules are al- most universal:

• Register select pin. Tells the display whether the incoming data is an instruction, or a code identifying a displayable character.

• Read/write pin. Tells the display whether to receive characters from a microcontroller or send them to a microcontroller.

• Enable/disable pin.

• Character data input pins. There will be eight pins to receive the 8-bit ASCII code for each displayable character in parallel. Often there is an option to use only four of these pins, to reduce the number of microcontroller out- puts necessary to drive the display. Where four pins are used, each 8-bit character is sent in two segments.

• LED backlight pin. Two may be provided, one connected to the anode(s) of the LED back- light, the other to the cathode(s).

• Reset pin.

Embedded instruction codes can be complex, including commands to reposition the cursor at a specific screen location, backspace-and-erase, scroll the display, and erase all characters on the screen. Codes may be included to adjust screen brightness and to switch the display between light-on-dark (negative) and dark-on-light (positive) characters.

Some display modules also have graphics capability, allowing the user to address any individual pixel on the screen.

Because of the lack of standardization in control codes, manufacturer’s datasheets must be consulted to learn the usage of a particular alpha- numeric display module. In addition to data- sheets, online user forums are a valuable source of information regarding quirks and undocumented features.

What Can Go Wrong
Temperature Sensitivity

Liquid crystals vary in their tolerance for low and high temperatures, but generally speaking, a higher voltage may be necessary to create a sufficiently dense image at a low temperature. Conversely, a lower voltage may be necessary to avoid “ghosting” at a high temperature. An absolutely safe operating temperature range is likely to be 0 through 50 degrees Celsius, but check the manufacturer’s datasheet for confirmation. Special-purpose LCDs are available for extreme temperatures.

Excessive Multiplexing

A twisted nematic display is likely to perform poorly if its duty cycle is greater than 1:4. In other words, more than four displays should not be multiplexed by the same controller.

DC Damage

An LCD can be damaged quickly and permanently if it is subjected to DC current. This can occur by accident if, for example, a timer chip is being used to generate the AC pulse stream, and the timer is accidentally disconnected, or has an incorrect connection in its RC network. Check timer output with a meter set to measure AC volts before allowing any connection to the common pin of an LCD.

Bad Communications Protocol

Many alphanumeric display modules do not use a formal communications protocol. Duplex serial or I2C connection may not be available. Care must be taken to allow pauses of a few milliseconds after execution of embedded commands, to give the display sufficient time to complete the instruction. This is especially likely where a command to clear all characters from the screen has to be executed. If garbage characters appear on the screen, incorrect data transfer speed or lack of pause times may be to blame.

Wiring Errors

This is often cited by manufacturers as the most common cause of failure to display characters correctly, or lack of any screen image at all.