You are on page 1of 3

Program a microcontroller PIC. LCD Driver 2x16.

Hi, students I`m going to show you how program a LCD 2x16 With CCS compiler. 1. Using ISIS of Proteus you have to connect the LCD with PIC just as the library lcd.c commands to do it:

2. The example program written in C, using CCS compiler is: #define(__PCM__) #include <16F877A.h> #fuses XT,NOWDT,NOPROTECT,NOLVP #use delay(clock=4000000) #include <lcd.c> #define sw1 #define sw2 #define LED PIN_A0 PIN_A1 PIN_B0

int16 contador, contador2; void main () { lcd_init(); While (TRUE) {

printf(lcd_putc,"\fBrian\n: %Lu",contador); contador = contador + 1; delay_ms(500); } }

3. Just have fun!!! Thats all!!

Andres Mauricio Vanegas Ariza

You might also like