Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
LCD LIBRARY
The mikroBasic PRO for AVR provides a library for communication with Lcds (with
HD44780 compliant controllers) through the 4-bit interface. An example of Lcd con-
nections is given on the schematic at the bottom of this page.
For creating a set of custom Lcd characters use Lcd Custom Character Tool.
External dependencies of Lcd Library
240
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using Lcd
Library:
Description: 
Example : 
dim LCD_RS as sbit
sfr external
Register Select line.
dim LCD_RS as sbit at
PORTD.B2 
dim LCD_EN as sbit
sfr external 
Enable line.
dim LCD_EN as sbit at
PORTD.B3
dim LCD_D7 as sbit
sfr external
Data 7 line.
dim LCD_D7 as sbit at
PORTD.B4
dim LCD_D6 as sbit
sfr external
Data 6 line.
dim LCD_D6 as sbit at
PORTD.B5
dim LCD_D5 as sbit
sfr external
Data 5 line.
dim LCD_D5 as sbit at
PORTD.B6
dim LCD_D4 as sbit
sfr external
Data 4 line.
dim LCD_D4 as sbit at
PORTD.B7
dim LCD_RS_Direction
as sbit sfr external
Register Select direction pin.
dim LCD_RS_Direction
as sbit at DDRD.B2 
dim LCD_EN_Direction
as sbit sfr external 
Enable direction pin.
dim LCD_EN_Direction
as sbit at DDRD.B3
dim LCD_D7_Direction
as sbit sfr external
Data 7 direction pin.
dim LCD_D7_Direction
as sbit at DDRD.B4
dim LCD_D6_Direction
as sbit sfr external
Data 6 direction pin.
dim LCD_D6_Direction
as sbit at DDRD.B5
dim LCD_D5_Direction
as sbit sfr external
Data 5 direction pin.
dim LCD_D5_Direction
as sbit at DDRD.B6
dim LCD_D4_Direction
as sbit sfr external
Data 4 direction pin.
dim LCD_D4_Direction
as sbit at DDRD.B7