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

MISSING FUNCTION PROTOTYPE AND REQUIRE ANSI-TYPE PROTOTYPE

COMPILE TIME ERROR::mini project.c(49): warning C206: 'lcddata': missing function-prototype ::mini project.c(49): error C267: 'lcddata': requires ANSI-style prototype

PROGRAM

#include<reg51.h>
sfr LCD=0x80;
sbit RS=P2^6;
sbit EN=P2^7;
unsigned int a=0,i=0,v;
void tm();
void delay(unsigned char time)
{ unsigned int a,b;
for(a=0;a<time;a++)
for(b=0;b<1275;b++);
} void lcdmd(unsigned char value)
{ LCD=value;
RS=1;
EN=1;
delay(10);
EN=0;
} void lcd_init()
{ lcdmd(0x38);
delay(20);
lcdmd(0x0c);
delay(20);
lcdmd(0x01);
delay(20);
lcdmd(0x06);
delay(20);
} void ISR_ex0(void)interrupt 0
{ while(1)
{ tm();
a++;
} }
void ISR_ex1(void) interrupt 2
{ unsigned char m,n,temp,o;
v=100/a;
m=v/100;
temp=v%100;
n=temp/10;
o=temp%10;
lcdmd(0xc6);
lcddata(m+48);
lcddata(n+48);
lcddata(o+48);
a=0;
lcddata('m');
lcddata('m');
lcddata('/');
lcdddata('s');
lcddata('e');
lcddata('c');
lcddata('')
lcddata('')
} void main()
{ unsigned char w[]="WELCOMESPEED=WAITING...";
IT0=1; //Configure interrupt 0 for falling edge on/INT0 (P3.2)
EX0=1; //Enable EX0 Interrupt
IT1=1; //Configure interrupt 1 for falling edge on/INT0 (P3.2)
EX1=1; //Enable EX1 Interrupt
EA=1; //Enable Global Interrupt Flag
IP=0x04; //Priority of ex 1 high
lcd_int();
lcdcmd(0x84);
for(i=0;i<7;i++)
lcddata(w[i]);
lcdmd(0xc0);
for(i=7;i<13;i++)
lcddata(w[i]);
for(i=13;i<24;i++)
lcddata(w[i]);
while(1)
} void tm()
{ int y=0;
for(y=0;y<15;y++)
{ TMOD=0x01;
TL0=0xFD;
TH0=0x4B;
TR0=1;
while(TF0==0);
TR0=0;
TF0=0;
} }

CAN ANYONE PLEASE HELP ME WITH THIS