For an image to be displayed on (128x64) graphics LCD, the image must have following features:
· It should be in Windows BitMap format (.bmp)
· It should be black and white (1 bit per pixel)
· It should not have any compression
· Its size should be 128 x 64 pixels
The hex code for an image can be generated from any of the bitmap code generating software available on internet. These codes are stored in an array and the array is stored in a header file with ‘.h’ extension. This header file must be included in main program. (The header file declarations for this project is given in Code2) The connections of Graphical LCD with controller are shown in circuit diagram.
A function is written to display the image in the format of a two dimensional array with size: .
a) First, set the column and page to 0.
b) Column is made to vary from 0 to 128 while row is kept constant. The corresponding hex code from the two dimensional array is then sent to the LCD Data Port.
c) [ lcddata(&val[ (j*128) ],128); ] This condition is used to display codes on LCD from column 0 to 127. j*128 is given to skip 128 bytes when page(row) changes.