Microcontroller › 8051 › what does these warnings mean???? › this is the
February 12, 2012 at 12:40 pm
#7143
shanthi
Participant
this is the code..
#include<absacc.h>
#include<reg52.h>
sbit rs=P2^0;
sbit rw=P2^1;
sbit e=P2^2;
unsigned char c[11];// to receive tag Id
const unsigned char Tag1[11]= {‘0′,’0′,’1′,’5′,’3′,’9′,’7′,’6′,’5′,’1’};// to store tag numbers
const unsigned char Tag2[11]= {‘0′,’0′,’1′,’5′,’3′,’9′,’7′,’6′,’5′,’0’};
const unsigned char Tag3[11]= {‘0′,’0′,’1′,’5′,’3′,’9′,’4′,’7′,’9′,’8’};
unsigned int bn; // to store bus number
unsigned char area[4];// to store area number
unsigned int n=11; // no. of bytes in tag id
void delay(unsigned int );
void lcdinit(void);
void rtcinit(void);
void lcdcmd(unsigned char);
void welcome(void);
void receive(void);
void bus1(void);
void bus2(void);
void bus3(void);
void nomatch(void);
void rtc(void);
void bcdconv(unsigned char) ;
void lcddata(unsigned char );
void lcdstring(unsigned char * );
void main()
{
unsigned int i;
unsigned int v1,v2,v3,vn; // variables in switch cases
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
lcdinit();
delay(25);
welcome();
delay(25);
while(1)
{
receive(); // function to recieve tag id into array
v1=v2=v3=vn=0;
for(i=0;i<n;i++) // loop to compare the recieved tag and the id’s stored in tags
{
if(c==Tag1)
v1++;
else
if(c==Tag2)
v2++;
else
if(c==Tag3)
v3++;
else
if(c!=(Tag1&&Tag2&&Tag3))
vn++;
} // end of for loop
//if value of any variable is n i.e., the number of bytes then the coresponding fumction is called
if(v1==n)
bus1();
else
if(v2==n)
bus2();
else
if(v3==n)
bus3();
else
if(vn==n)
nomatch();
//Function to initialize the Real Time Clock (RTC)
rtcinit();
delay(25);
//Funtion to Obtain the Time From the RTC
rtc();
}// end of while loop
}//end of main function
// Welcome function
void welcome()
{
unsigned int i=0;
unsigned char c[]=”WELCOME TO RFID”;
unsigned char d[]=”BUS ID SYSTEM”;
lcdcmd(0x01);
delay(1);
lcdcmd(0x80); //
delay(1);
for(i=0;c!=’