User manual
374
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
Lcd_Init
Prototype
procedure Lcd_Init();
Description Initializes Lcd module.
Parameters None.
Returns Nothing.
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 dened before using this function.
Example
// LCD module connections
var LCD_RS : sbit at LATD0_bit;
var LCD_EN : sbit at LATD1_bit;
var LCD_D4 : sbit at LATB0_bit;
var LCD_D5 : sbit at LATB1_bit;
var LCD_D6 : sbit at LATB2_bit;
var LCD_D7 : sbit at LATB3_bit;
var LCD_RS_Direction : sbit at TRISD0_bit;
var LCD_EN_Direction : sbit at TRISD1_bit;
var LCD_D4_Direction : sbit at TRISB0_bit;
var LCD_D5_Direction : sbit at TRISB1_bit;
var LCD_D6_Direction : sbit at TRISB2_bit;
var LCD_D7_Direction : sbit at TRISB3_bit;
// End LCD module connections
...
Lcd_Init();
Notes None