jayanth.devarayanadurga
Banned
- Joined
- Dec 4, 2012
- Messages
- 4,280
- Helped
- 822
- Reputation
- 1,654
- Reaction score
- 791
- Trophy points
- 1,393
- Location
- Bangalore, India
- Activity points
- 0
Post your code.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include<htc.h>
#define _XTAL_FREQ 20000000
#define RS PORTEbits.RE0
#define RW PORTEbits.RE1
#define EN PORTEbits.RE2
#define LED PORTAbits.RA0
void lcd_cmd(unsigned char a);
void lcd_data1(unsigned char b);
void lcd_cmd(unsigned char a)
{
RS=0;
RW=0;
LATB=a;
EN=1;
__delay_ms(10);
EN=0;
}
void lcd_data1(unsigned char b)
{
RS=1;
RW=0;
LATB=b;
EN=1;
__delay_ms(10);
EN=0;
}
void main()
{
unsigned char i=0;
TRISB=0;
LATB=0;
TRISC=0;
LATC=0;
TRISA=0;
TRISE = 0x00;
PORTE = 0b000;
LATB = 0b000;
ADCON0 = 0x00;
ADCON1 = 0b00001111;
CMCON = 0x07;
LED=1;
lcd_cmd(0x38);
__delay_ms(10);
lcd_cmd(0x0E);
__delay_ms(10);
lcd_cmd(0x06);
__delay_ms(10);
lcd_cmd(0x01);
__delay_ms(10);
lcd_data1('A');
lcd_data1('B');
lcd_data1('H');
lcd_data1('I');
lcd_data1('S');
lcd_data1('H');
lcd_data1('E');
lcd_data1('K');
while(1);
}
#define RS [COLOR="#FF0000"]PORTCbits.RC0[/COLOR]
#define RW [COLOR="#FF0000"]PORTCbits.RC1[/COLOR]
#define EN [COLOR="#FF0000"]PORTCbits.RC2[/COLOR]
#include<htc.h>
#include<string.h>
#define _XTAL_FREQ 20000000
#define RS PORTCbits.RC0
#define RW PORTCbits.RC1
#define EN PORTCbits.RC2
#define LED RA0
void lcd_cmd(unsigned char a);
void lcd_data1(unsigned char b);
//void lcd_write(unsigned char);
//unsigned char name[]="ABHISHEK";
void main()
{
unsigned char i=0;
TRISB=0;
LATB=0;
TRISC=0;
LATC=0;
TRISA=0;
lcd_cmd(0x38);
__delay_ms(10);
lcd_cmd(0x0E);
__delay_ms(10);
lcd_cmd(0x06);
__delay_ms(10);
lcd_cmd(0x01);
__delay_ms(10);
lcd_data1('A');
LED=1;
while(1);
}
void lcd_cmd(unsigned char a)
{
RS=0; [COLOR="#FF0000"]// line 37[/COLOR]
RW=0; [COLOR="#FF0000"]// line 38[/COLOR]
LATC=a;
EN=1; [COLOR="#FF0000"]// line 40[/COLOR]
__delay_ms(10);
EN=0; [COLOR="#FF0000"]// line 42[/COLOR]
}
void lcd_data1(unsigned char b)
{
RS=1; [COLOR="#FF0000"]// line 47[/COLOR]
RW=0; [COLOR="#FF0000"]// line 48[/COLOR]
LATC=b;
EN=1; [COLOR="#FF0000"]// line 50[/COLOR]
__delay_ms(10);
EN=0; [COLOR="#FF0000"]// line 52[/COLOR]
}
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC-18\PRO\9.65\bin\picc18.exe" --pass1 "E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c" -q --chip=18F4550 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 37.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 37.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 38.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 38.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 40.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 40.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 42.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 42.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 47.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 47.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 48.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 48.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 50.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 50.16 illegal conversion between types
Error [255] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 52.14 not a member of the struct/union ""
Error [182] E:\Embedded Program\PIC18F4550\LCD\lcd_pic.c; 52.16 illegal conversion between types
********** Build failed! **********