Circuit provides effective LCD drive
LCDs find wide use in portable instruments, thanks to their attractive display and low power consumption. The circuit in Figure 1 is an effective driver for LCDs. The circuit comprises two main sections—the ICM7211 drivers (IC2 and IC3) and the YN06 display itself (IC1). The Intersil (www.intersil.com) ICM7211 is a 4-bit LCD driver that needs no external components. It contains three basic sections: a reference signal-generator circuit, an input and display-channel section, and a digit-selection and drive circuit. It contains a complete pulse-generator unit and an oscillator-divider clock-drive circuit. When you disconnect the BP pin (Pin 5), the IC produces a 125-Hz pulse signal. YN06 is a six-bit character LCD, which uses 5 decimal bits and 2 column bits. To control the display, you need a 4-bit BCD driver.
In Figure 1, an AT89C51 µC controls the two ICM7211 drivers. The drivers in turn drive the 6-bit YN06. Pin 5 of IC2 and IC3 connect to the COM pin (Pin 1) of IC1. The reference signal-generator circuit works in open-loop mode. This mode results when you disconnect the OSC pin (Pin 36) of IC2 and connect the OSC pin (Pin 36) of IC3 to ground. The result is a 125-Hz pulse train, which serves as the LCD's drive clock. The chip-enable signals of IC2 and IC3 to connect to the µC's pins P2.5 and P2.6, and connects to Pin P3.6, which serves as a read or write port. In addition, data-input ports B0 to B3 and digital-selection input ports DS1 and DS2 connect to the data bus through the D0 to D5 lines. To control the LCD, you need only provide 4-bit BCD codes through the µC. Unfortunately, in some cases, the display needs decimal bits. The normal method of providing these bits is to add another LCD decimal driver, such as a CD4056.
Note that the LCD in Figure 1 needs only 6 bits, whereas the drivers can provide 8 bits. That fact means that two more seven-segment output ports go unused. You can take advantage of the unused ports of IC2 and IC3 to solve the decimal-bit problem. Connect DP1 (Pin 5 of IC1) to Pin 25 of IC3, DP2 (Pin 9 of IC1) to Pin 23 of IC3, DP3 (Pin 13 of IC1) to Pin 21 of IC3, and DP4 (Pin 17 of IC1) to Pin 25 of IC2. Also, connect COL1 (Pin 33 of IC1) to Pin 23 of IC2, and COL2 (Pin 42 of IC1) to Pin 24 of IC2. With the help of some µC software, you can control the LCD in a flexible fashion. Listing 1 shows the AT89C51 assembly code for controlling the LCD.