Datasheet
Glcd_Init
284
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Glcd_Init();
Returns Nothing.
Description
Initializes the Glcd module. Each of the control lines is both port and pin config-
urable, while data lines must be on a single port (pins <0:7>).
Requires
Global variables :
-
GLCD_CS1 : Chip select 1 signal pin
-
GLCD_CS2 : Chip select 2 signal pin
-
GLCD_RS : Register select signal pin
-
GLCD_RW : Read/Write Signal pin
-
GLCD_EN : Enable signal pin
- GLCD_RST : Reset signal pin
- GLCD_DataPort : Data port
- GLCD_CS1_Direction : Direction of the Chip select 1 pin
- GLCD_CS2_Direction : Direction of the Chip select 2 pin
- GLCD_RS_Direction : Direction of the Register select signal pin
- GLCD_RW_Direction : Direction of the Read/Write signal pin
- GLCD_EN_Direction : Direction of the Enable signal pin
- GLCD_RST_Direction : Direction of the Reset signal pin
-
GLCD_DataPort_Direction : Direction of the Data port
must be defined before using this function.
Example
// glcd pinout settings
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_RST at PORTD.B6;
sbit GLCD_EN 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;
...
Glcd_Init();