User manual

320
mikoBasic PRO for PIC32
MikroElektronika
Lcd Library
mikroBasic PRO for PIC32 provides a library for communication with Lcds (with HD44780 compliant controllers) through
the 4-bit interface. An example of Lcd connections is given on the schematic at the bottom of this page.
For creating a set of custom Lcd characters use Lcd Custom Character Tool.
Library Dependency Tree
The following variables must be dened
in all projects using Lcd Library:
Description: Example:
dim LCD_RS as sbit sfr external
Register Select line.
dim LCD_RS as sbit at LATD0_bit
dim LCD_EN as sbit sfr external
Enable line.
dim LCD_EN as sbit at LATD1_bit
dim LCD_D4 as sbit sfr external
Data 4 line.
dim LCD_D4 as sbit at LATB0_bit
dim LCD_D5 as sbit sfr external
Data 5 line.
dim LCD_D5 as sbit at LATB1_bit
dim LCD_D6 as sbit sfr external
Data 6 line.
dim LCD_D6 as sbit at LATB2_bit
dim LCD_D7 as sbit sfr external
Data 7 line.
dim LCD_D7 as sbit at LATB3_bit
dim LCD_RS_Direction as sbit sfr
external
Register Select direction pin.
dim LCD_RS_Direction as sbit at TRISD0_bit
dim LCD_EN_Direction as sbit sfr
external
Enable direction pin.
dim LCD_EN_Direction as sbit at TRISD1_bit
dim LCD_D4_Direction as sbit sfr
external
Data 4 direction pin.
dim LCD_D4_Direction as sbit at TRISB0_bit
dim LCD_D5_Direction as sbit sfr
external
Data 5 direction pin.
dim LCD_D5_Direction as sbit at TRISB1_bit
dim LCD_D6_Direction as sbit sfr
external
Data 6 direction pin.
dim LCD_D6_Direction as sbit at TRISB2_bit
dim LCD_D7_Direction as sbit sfr
external
Data 7 direction pin.
dim LCD_D7_Direction as sbit at TRISB3_bit
External dependencies of Lcd Library
Library Routines
- Lcd_Init
- Lcd_Out
- Lcd_Out_Cp
- Lcd_Chr
- Lcd_Chr_Cp
- Lcd_Cmd