mikroC

making it simple...

LCD Library (4-bit interface)

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC provides a library for communicating with commonly used LCD (4-bit interface). Figures showing HW connection of PIC and LCD are given at the end of the chapter.

Note: Be sure to designate port with LCD as output, before using any of the following library functions.

Library Routines

Lcd_Config

Lcd_Init

Lcd_Out

Lcd_Out_Cp

Lcd_Chr

Lcd_Chr_Cp

Lcd_Cmd

Lcd_Config

Prototype

void

Lcd_Config(char *port, char RS, char EN, char WR, char D7,

 

char

D6, char D5, char D4);

 

 

Description

Initializes LCD at port with pin settings you specify: parameters RS, EN, WR, D7 .. D4

 

need to be a combination of values 0–7 (e.g. 3,6,0,7,2,1,4).

 

 

Example

Lcd_Config(PORTD,1,2,0,3,5,4,6);

 

 

 

 

 

page

 

MikroElektronika: Development tools - Books - Compilers

197