Datasheet

Glcd_Image
Library Example
The following example demonstrates routines of the Glcd library: initialization, clear(pattern fill),
image displaying, drawing lines, circles, boxes and rectangles, text displaying and handling.
//Declarations-----------------------------------------------------------------
-const code char truck_bmp[1024];
//--------------------------------------------------------------end-declara-
tions
// Glcd module connections
char GLCD_DataPort at PORTC;
char GLCD_DataPort_Direction at DDRC;
sbit GLCD_CS1 at PORTD.B2;
sbit GLCD_CS2 at PORTD.B3;
sbit GLCD_RS at PORTD.B4;
sbit GLCD_RW at PORTD.B5;
sbit GLCD_EN at PORTD.B6;
sbit GLCD_RST at PORTD.B7;
sbit GLCD_CS1_Direction at DDRD.B2;
sbit GLCD_CS2_Direction at DDRD.B3;
sbit GLCD_RS_Direction at DDRD.B4;
sbit GLCD_RW_Direction at DDRD.B5;
sbit GLCD_EN_Direction at DDRD.B6;
sbit GLCD_RST_Direction at DDRD.B7;
// End Glcd module connections
295
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Glcd_Image(code const unsigned short *image);
Returns Nothing.
Description
Displays bitmap on Glcd.
Parameters :
- image: image to be displayed. Bitmap array must be located in code
memory.
Use the mikroC PRO for AVR integrated Glcd Bitmap Editor to convert image to
a constant array suitable for displaying on Glcd.
Requires Glcd needs to be initialized, see Glcd_Init routine.
Example
// Draw image my_image on Glcd
Glcd_Image(my_image);