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++); }
So provide an ANSI-style prototype, then!
Please read the manual: http://www.keil.com/support/man/docs/c51/c51_c267.htm
Also, pay attention to the instructions for posting source code - look at this picture: www.danlhenry.com/.../keil_code.png
Or try reorganizing the code so functions are defined BEFORE they are used.
Read some books on C if your teacher/tutor are ineffective.
Will someone post the tut for c. I cant find it on the google.
www2.southeastern.edu/.../the_c_programming_language_2.pdf
ere u go
blog.antronics.co.uk/.../
Where is your function declaration???
Use void lcdcmd(unsigned char);
before main function.
If he's still trying to figure that out after three months, then all we can do is admire his persistence. Sure as heck wouldn't be able to admire his investigative skills!
Hello Bharath,
See also these articles:
http://www.keil.com/support/docs/1865.htm
http://www.keil.com/support/docs/884.htm
While it is, of course, possible to learn a programming language by yourself, it requires a good deal of disciplined study and practice to learn it well.
Andy, that is not fair, today everything is supposed to be as easy as downloading an app. Do you really suggest to someone that they do some work?