Datasheet
Lcd_Init
307
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Lcd_Init();
Returns Nothing.
Description Initializes Lcd module.
Requires
Global variables:
- LCD_D7: Data bit 7
- LCD_D6: Data bit 6
- LCD_D5: Data bit 5
- LCD_D4: Data bit 4
-
LCD_RS: Register Select (data/instruction) signal pin
-
LCD_EN: Enable signal pin
-
LCD_D7_Direction: Direction of the Data 7 pin
- LCD_D6_Direction: Direction of the Data 6 pin
- LCD_D5_Direction: Direction of the Data 5 pin
- LCD_D4_Direction: Direction of the Data 4 pin
- LCD_RS_Direction: Direction of the Register Select pin
- LCD_EN_Direction: Direction of the Enable signal pin
must be defined before using this function.
Example
// Lcd pinout settings
sbit LCD_RS at PORTD.B2;
sbit LCD_EN at PORTD.B3;
sbit LCD_D7 at PORTD.B4;
sbit LCD_D6 at PORTD.B5;
sbit LCD_D5 at PORTD.B6;
sbit LCD_D4 at PORTD.B7;
// Pin direction
sbit LCD_RS_Direction at DDRD.B2;
sbit LCD_EN_Direction at DDRD.B3;
sbit LCD_D7_Direction at DDRD.B4;
sbit LCD_D6_Direction at DDRD.B5;
sbit LCD_D5_Direction at DDRD.B6;
sbit LCD_D4_Direction at DDRD.B7;
...
Lcd_Init();