Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

LCD and Key board interfacing with PIC18f code for ccs C Compiler

Status
Not open for further replies.

sana khan 01

Junior Member level 2
Joined
Oct 26, 2011
Messages
22
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Islamabad, Pakistan
Activity points
1,418
Hi there


Kindly anybody share me sample code for PIC with LCD and 3X4 key pad interfacing

i am using CCS C compiler ............
 

i can do this code but still error comes

the error in lcd.c file " Error 128 "LCD.c" Line 71(1,1): A #DEVICE required before this line"
i can use lcd.c and kbd.c driver file for PIC C and im using ccs c compiler



Code:
#include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP                  
#use delay(clock=20000000)


#include "lcd.c"
#include "kbd.c"


void main()
{
   	char k;

   	lcd_init();
   	kbd_init();

   	lcd_putc("\fReady...\n");

   	while (TRUE)
	{
    		k=kbd_getc();

      		if(k!=0)
        	if(k=='*')
          	lcd_putc('\f');
                else
                lcd_putc(k);
  	}	
}

Use CODE tags when posting code.
 
Last edited by a moderator:

According 2 me
change ur file name from LCD.c to lcd.c
then try it........

---------- Post added at 01:57 ---------- Previous post was at 01:56 ----------

According 2 me
change ur file name from LCD.c to lcd.c
then try it........
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top