Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
LCD LIBRARY
The mikroPascal PRO for AVR provides a library for communication with Lcds (with
HD44780 compliant controllers) through the 4-bit interface. An example of Lcd connec-
tions 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
Library Routines
- Lcd_Init 
- Lcd_Out 
- Lcd_Out_Cp 
- Lcd_Chr 
- Lcd_Chr_Cp 
- Lcd_Cmd 
254
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
The following variables
must be defined in all proj-
ects using Lcd Library :
Description: 
Example : 
var LCD_RS : sbit; sfr;
external;
Register Select line.
var LCD_RS : sbit at
PORTD.B2;
var LCD_EN : sbit; sfr;
external;
Enable line.
var LCD_EN : sbit at
PORTD.B3;
var LCD_D7 : sbit; sfr;
external;
Data 7 line.
var LCD_D7 : sbit at
PORTD.B4;
var LCD_D6 : sbit; sfr;
external;
Data 6 line.
var LCD_D6 : sbit at
PORTD.B5;
var LCD_D5 : sbit; sfr;
external;
Data 5 line.
var LCD_D5 : sbit at
PORTD.B6;
var LCD_D4 : sbit; sfr;
external;
Data 4 line.
var LCD_D4 : sbit at
PORTD.B7;
var LCD_RS_Direction :
sbit; sfr; external;
Register Select direction pin.
var LCD_RS_Direction :
sbit at DDRD.B2;
var LCD_EN_Direction :
sbit; sfr; external;
Enable direction pin.
var LCD_EN_Direction :
sbit at DDRD.B3;
var LCD_D7_Direction :
sbit; sfr; external;
Data 7 direction pin.
var LCD_D7_Direction :
sbit at DDRD.B4;
var LCD_D6_Direction :
sbit; sfr; external;
Data 6 direction pin.
var LCD_D6_Direction :
sbit at DDRD.B5;
var LCD_D5_Direction :
sbit; sfr; external;
Data 5 direction pin.
var LCD_D5_Direction :
sbit at DDRD.B6;
var LCD_D4_Direction :
sbit; sfr; external;
Data 4 direction pin.
var LCD_D4_Direction :
sbit at DDRD.B7;