please help me out ...
i am trying to execute a program for lcd to display something and when i execute my program it shows me this message error C267 : 'LcdCmd' : requires ANSI-style prototype
my program is below...
#include<reg51.h>
sfr ldata = 0x90; sbit rs = P2^0; sbit rw = P2^1; sbit en = P2^2;
void main(){
LcdCmd(0x38); Delay(250); LcdCmd(0x0E); Delay(250); LcdCmd(0x01); Delay(250); LcdCmd(0x06); Delay(250); LcdCmd(0x86); Delay(250); LcdData('M'); Delay(250); LcdData('B'); Delay(250); LcdData('D'); } void LcdCmd(unsigned char value){ ldata = value; rs = 0; rw = 0; en = 1; Delay(1); en = 0; return;
} void LcdData(unsigned char value){ ldata = value; rs = 1; rw = 0; en = 1; Delay(1); en = 0; return;
} void Delay(unsigned int itime){ unsigned int i, j; for(i=0;i<itime;i++) for(j=0;j<itime;j++);
}
please help me
Congratulations on totally not reading the posting tips.
So, why don't you prototype the functions before calling them, or defining them before calling them. ie define them in an order that permits the compiler to know about them, before you use them.
Protoype: void LcdData(unsigned char);