Datasheet
Lcd_Init
255
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure 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 module connections
var LCD_RS : sbit at PORTD.B2;
var LCD_EN : sbit at PORTD.B3;
var LCD_D4 : sbit at PORTD.B4;
var LCD_D5 : sbit at PORTD.B5;
var LCD_D6 : sbit at PORTD.B6;
var LCD_D7 : sbit at PORTD.B7;
var LCD_RS_Direction : sbit at DDRD.B2;
var LCD_EN_Direction : sbit at DDRD.B3;
var LCD_D4_Direction : sbit at DDRD.B4;
var LCD_D5_Direction : sbit at DDRD.B5;
var LCD_D6_Direction : sbit at DDRD.B6;
var LCD_D7_Direction : sbit at DDRD.B7;
// End Lcd module connections
...
Lcd_Init();