Embedded processor directly drives LCD
Driving a bare LCD does not necessarily require specialized interface circuitry or peripherals. This Design Idea describes an alternative drive scheme, which you can easily implement using the general-purpose outputs of a microcontroller. Many embedded-system applications need to interact with a user by displaying simple numeric or alphanumeric characters. Seven- or 14-segment LED displays are readily available at low cost and in many sizes. However, their relatively high power requirements and limited readability in direct sunlight restrict their use in battery-powered, portable devices. LCD modules driven by HD44780-compatible controllers offer simple interface characteristics, low power consumption, and good readability. However, their cost is relatively high, and their large dimensions sometimes preclude their use in small enclosures. Bare LCDs overcome these disadvantages. However, their drive requirements are usually nontrivial. Figure 1 shows the usual waveforms you use to drive an LCD with four backplanes. The algorithm uses four discrete voltage levels for all LCD signals. Synthesis of such signals without dedicated peripherals or an external controller is difficult and requires many components. Fortunately for users of general-purpose microcontrollers without specialized on-chip peripherals, an alternative exists. Figure 2 shows the alternative waveforms.
The algorithm uses only three voltage levels on the backplane pins and only two voltage levels on the front-plane pins of the LCD. Such waveforms are easy to synthesize using the general-purpose pins of a microcontroller. Figure 3 shows a typical application of the alternative algorithm, using a general-purpose microcontroller. You implement the BPx (backplane) connections using general-purpose, tristatable outputs of the microcontroller. The FPx (frontplane) connections require only ordinary, general-purpose outputs. You obtain the VDD/2 voltage on the BPx pins by tristating the microcontroller's pins. (You can usually obtain this result by configuring the pins as inputs.) Modern microcontrollers operate from a wide range of power-supply voltages. Altering the microcontroller's power-supply voltage is an effective way of adjusting the LCD's contrast. Figure 4 shows examples of LCDs driven by general-purpose microcontrollers from Motorola (www.motorola.com). Figure 4a shows a display with two×11-segment organization; for Figure 4b, the organization is four×16 segments. Figure 5 shows the modification of the waveforms for the smaller display of Figure 4a, using only two backplanes.
Is this the best Design Idea in this issue? Select at www.edn.com.