Datasheet
GRAPHIC LCD LIBRARY
The mikroC PRO for AVR provides a library for operating Graphic LCD 128x64 (with
commonly used Samsung KS108/KS107 controller).
For creating a custom set of Glcd images use Glcd Bitmap Editor Tool.
External dependencies of Graphic LCD Library
282
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
The following variables must
be defined in all projects
using Graphic LCD Library:
Description : Example :
extern sfr char
GLCD_DataPort;
Glcd Data Port.
char GLCD_DataPort at
PORTC;
extern sfr char
GLCD_DataPort_Direction;
Direction of the Glcd
Data Port.
char
GLCD_DataPort_Directio
n at DDRC;
extern sfr sbit GLCD_CS1;
Chip Select 1 line.
sbit GLCD_CS1 at
PORTD.B2;
extern sfr sbit GLCD_CS2;
Chip Select 2 line.
sbit GLCD_CS2 at
PORTD.B3;
extern sfr sbit GLCD_RS;
Register select line.
sbit GLCD_RS at
PORTD.B4;
extern sfr sbit GLCD_RW;
Read/Write line.
sbit GLCD_RW at
PORTD.B5;
extern sfr sbit GLCD_EN;
Enable line.
sbit GLCD_EN at
PORTD.B6;
extern sfr sbit GLCD_RST;
Reset line.
sbit GLCD_RST at
PORTD.B7;
extern sfr sbit
GLCD_CS1_Direction;
Direction of the Chip
Select 1 pin.
sbit LCD_CS1_Direction
at DDRD.B2;
extern sfr sbit
GLCD_CS2_Direction;
Direction of the Chip
Select 2 pin.
sbit LCD_CS2_Direction
at DDRD.B3;
extern sfr sbit
GLCD_RS_Direction;
Direction of the
Register select pin.
sbit GLCD_RS_Direction
at DDRD.B4;
extern sfr sbit
GLCD_RW_Direction;
Direction of the
Read/Write pin.
sbit GLCD_RW_Direction
at DDRD.B5;
extern sfr sbit
GLCD_EN_Direction;
Direction of the
Enable pin.
sbit GLCD_EN_Direction
at DDRD.B6;
extern sfr sbit
GLCD_RST_Direction;
Direction of the
Reset pin.
sbit LCD_RST_Direction
at DDRD.B7;