Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
GRAPHIC LCD LIBRARY
The mikroBasic 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
218
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
The following variables must
be defined in all projects
using Graphic Lcd Library:
Description: 
Example : 
dim GLCD_DataPort as byte
sfr external
Glcd Data Port.
dim GLCD_DataPort as
byte at 
PORTC
dim
GLCD_DataPort_Direction
as byte sfr external
Direction of the Glcd Data
Port.
dim
GLCD_DataPort_Directi
on 
as byte at DDRC
dim GLCD_CS1 as sbit sfr
external
Chip Select 1 line.
dim GLCD_CS1 as sbit
at 
PORTD.B2
dim GLCD_CS2 as sbit sfr
external
Chip Select 2 line.
dim GLCD_CS2 as sbit
at 
PORTD.B3
dim GLCD_RS as sbit sfr
external
Register select line.
dim GLCD_RS as sbit
at 
PORTD.B4
dim GLCD_RW as sbit sfr
external
Read/Write line.
dim GLCD_RW as sbit
at 
PORTD.B5
dim GLCD_RST as sbit sfr
external
Reset line.
dim GLCD_RST as sbit
at 
PORTD.B6
dim GLCD_EN as sbit sfr
external
Enable line.
dim GLCD_EN as sbit
at 
PORTD.B7
dim GLCD_CS1_Direction as
sbit sfr external
Direction of the Chip
Select 1 pin.
dim
GLCD_CS1_Direction 
as
sbit at DDRD.B2
dim GLCD_CS2_Direction as
sbit sfr external
Direction of the Chip
Select 2 pin.
dim
GLCD_CS2_Direction 
as
sbit at DDRD.B3
dim GLCD_RS_Direction as
sbit sfr external
Direction of the Register
select pin.
dim GLCD_RS_Direction
as sbit at DDRD.B4
dim GLCD_RW_Direction as
sbit sfr external
Direction of the
Read/Write pin.
dim GLCD_RW_Direction
as sbit at DDRD.B5
dim GLCD_EN_Direction as
sbit sfr external
Direction of the Enable pin.
dim GLCD_EN_Direction
as sbit at DDRD.B6
dim GLCD_RST_Direction as
sbit sfr external
Direction of the Reset pin.
dim
GLCD_RST_Direction 
as
sbit at DDRD.B7