Graphical LCD interfacing with pic microcontroller

Here are two examples of Graphic LCD. One is displaying text and graphics and the latter one is displaying image logo.

Interfacing

For interfacing Graphical LCD with PIC Microcontroller, PIC needs one 8 bit port (data port) and a 6 bit port (control port). Refer this guide for bit description of the GLCD.

Graphical LCD

DB0-DB7 are the data signals and EN(E), RW, RS(D/I), CS1, CS2, RST are the control signals.

KS0108 library

This GLCD is based on two KS0108 controllers and libraries for this controller is available at this link: http://en.radzio.dxp.pl/ks0108/.

Example 1: Display text and graphics

KS0108 library contains all the functions for displaying fonts, line, square and circle. Include the library in the project, and use it wisely.

Example 2: Display images

Displaying images in GLCD is a simple task, but we need to convert the image in to an array of 128×64 array. For converting in to this format, first resize the image in to Monochrome bitmap format and the resolution should be 128×64. You can use any image editing programs like Microsoft Paint or Gimp etc for this purpose.

First resize it to 128×64 using the resize tool and then save it as a Monochrome bitmap. Then use this tool to convert the bitmap to an binary array.

Declare the array of size 1024 and use this for displaying the image. Browse the example 2 for understanding how the code is used.

Download examples

Download these examples from this link: Download GLCD example or Browse examples on GitHub.