This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error of LCD interfacing in C.c(9): error C267: 'lcdcmd': requires ANSI-style prototype

Hello Sir

I am getting error

compiling LCD interfacing in C.c...
LCD interfacing in C.c(9): warning C206: 'lcdcmd': missing function-prototype
LCD interfacing in C.c(9): error C267: 'lcdcmd': requires ANSI-style prototype
LCD interfacing in C.c - 1 Error(s), 1 Warning(s).

how to resolve the issue?

kindly anyone help...

my code is,

#include <reg51.h>
sfr ldata = 0x90;
sbit rs = P2^0;
sbit rw = P2^1;
sbit en = P2^2;
void main()

{ lcdcmd(0x38); msdelay(250); lcdcmd(0x0E); msdelay(250); lcdcmd(0x01); msdelay(250); lcdcmd(0x06); msdelay(250); lcdcmd(0x80); msdelay(250); lcddata('B'); msdelay(250); lcddata('H'); msdelay(250); lcddata('A'); msdelay(250); lcddata('R'); msdelay(250); lcddata('A'); msdelay(250); lcddata('T'); msdelay(250); lcddata('H'); msdelay(250); lcddata(' '); msdelay(250); lcddata('S'); msdelay(250);
}

void lcdcmd(unsigned char value)
{ ldata=value; rs=0; rw=0; en=1; msdelay(1); en=0; return;
} void lcddata(unsigned char val)
{ ldata=val; rs=1; rw=0; en=1; madelay(1); en=0; return;
} void msdelay(unsigned char itime)
{ unsigned int i,j; for(i=0;i<itime;i++) for(j=0;j<1275;j++);
}