Interfacing of Graphical LCD with ARM7 ( LPC2148 )




Text LCD (as we discussed 16×2 LCD earlier) has its own limitation, you can also create small graphics on Text LCD by generating custome character but somewhile it is limited. By using Graphical LCD(GLCD) we can present information in a better and user friendly way by using any patterns or shapes. Graphical LCDs are preferred where both character and graphical representation are required. GLCD is a bit complex and we need a powerful graphic library to work with it. MikroC PRO for PIC Microcontrollers provides powerful built in libraries for that

What is Graphical LCD ?

The graphical LCD is made up of a grid of pixels. Common resolution is 128×64. That means, their are 64 horizontal lines and each line has 128 pixels. These displays are monochrome that means each pixel can either be ON or OFF. ON pixels looks dark while OFF pixels are nearly invisible. The GLCD has a graphic RAM where each bit in RAM corresponds to one pixel on screen. You write to the graphic RAM to modify its contents and the screen will change accordingly.

About & Types of GLCD

There are various types of graphics LCD modules available in the market depending on pixel size such as 120×64, 128×128, 240×64,128×64 and 240×128. The graphics LCD used here has a pixel size of 128×64 and is based on AG12864EFIQB -H.

Interfacing Overview of GLCD

The graphical LCD used here is AMPIRE 128X64(AG12864EFIQB -H) module, which is a 128×64 pixel monochromatic display. It uses KS0108B (or KS0107B) display controller. The KS0108B is a dot matrix LCD segment driver with 64 channel output, and therefore, the GLCD module contains two sets of it to drive 128 segments. On the other hand, the KS0107B is a 64-channel common driver which generates the timing signal to control the two KS0108B segment drivers. The KS0108B and KS0107B are a very popular controllers and have made their way into many graphical LCDs. The internal block diagram of the AMPIRE 128X64 GLCD module is shown below.

internal block diagram of graphical lcd

The KS0107 drives the 64 display lines, COM1 – COM64. The first KS0108 drives the left half segments (SEG1 to SEG64) and the second one drives the right half segments (SEG65 to SEG128) of the display. The two halves of the display can be individually accessed through the chip select pins (CS1 and CS2) of the two KS0108 drivers. Each half consists of 8 horizontal pages (0-7) which are 8 bits (1 byte) high. This is illustrated in the drawing below.


                        Starting from page 0 on the left half (/CS1 = 0) if you transmit one data byte, it will appear on the first column of page 0. If you repeat this 64 times, then switch to the second half, and repeat until 128th position is reached, the first 8 display lines will be plotted. The next 8 lines can be plotted similarly by switching to page address 1. The total amount of bytes needed for a complete display frame (128×64 pixels) is, therefore, 2 x 64 pixels x 8 bits = 1024 bytes.

                        The AMPIRE 128X64 module does have an internal negative voltage generator circuit which provides a negative voltage at VEE external pin. An external potentiometer (usually 10 K) is connected between VDD and VEE pins to set the LCD contrast. The pin diagrams of KS0108 based GLCDs is not standardized and it is therefore, important to read the manufacturer’s datasheet for correct wiring of a GLCD module.

                           The following table shows the pin descriptions of AMPIRE 128X64 module. It has 20 pins with each different function shown below.

pin detail GLCD

The KS0107/KS0108 does not have a character generator so this must be implemented in the microcontroller firmware. The LCD controller supports a handful of instructions which are summarized in the table shown below. Note that the RS (D/I) pin is high only during data read and data write operations, and stays low when a transmitted byte is an instruction.


Software Detail

There are many software like Mikro C Pro, Mikroelectronica GLCD font creator, image2GLCD, etc


Typical application of Graphical LCD is show below application of GLCD

Click Here : Understanding of GLCD Interfacing

1. circuit diagram of graphical lcd (128×64 ) with ARM7 ( LPC2148 )

interfacing graphical lcd arm lpc2148 microcontroller

1. Program of graphical lcd (128×64) interfacing with ARM7( LPC2148 )




PROTEUS File for SIMULATION(Password Of RAR file is

download (1)

Content for the tab VIDEO