EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / what does these warnings mean????

what does these warnings mean????

|

Microcontroller › 8051 › what does these warnings mean????

  • This topic has 5 replies, 3 voices, and was last updated 13 years, 3 months ago by phanindra nath.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 9, 2012 at 10:53 am #1666
    shanthi
    Participant

    i am using keil version 3 for writing my code in embedded c..

    it shows me 19 warnings..and i dont know how to solve these..please anyone help in solving this..

     

    it shows warnings like this…

     

     

     

    Build target ‘Target 1’
    compiling finalcode.c…
    linking…
    *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0ACAH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0AD6H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0AFDH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C11H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C19H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C2DH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C45H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C4DH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C61H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C79H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C81H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0C95H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0D5BH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0D63H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0CDFH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0CEBH
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0CF7H
    *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
        SYMBOL:  _LCDCMD
        MODULE:  finalcode.obj (FINALCODE)
        ADDRESS: 0D03H
    Program Size: data=115.0 xdata=0 code=1470
    creating hex file from “finalcode”…
    “finalcode” – 0 Error(s), 19 Warning(s).

     

    February 9, 2012 at 8:30 pm #7131
    Syed Aameer
    Participant

    Please upload the Program…….

    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!=’’;i++) 
         lcddata(c);
      lcdcmd(0xc0);
      delay(1);
      for(i=0;d!=’’;i++)
         lcddata(d);
    }
     
    // function to recieve the tag id from reader
    void receive()
    {
      unsigned char t;
      for(t=0;t<n;t++)
       { 
          while(RI==0); //wait until value of RI is set to 1
          c[t]=SBUF;   //load SBUF value into array ‘c’
          RI=0; //clear value of RI to 0
       }
    }
     
    // Function to send the details of bus 1
    void bus1()
    {
        lcdcmd(0x01); 
        delay(10);
        lcdcmd(0x80);  
        delay(10);
        lcdstring(“Bus Number : 1” );  
        delay(10);
        lcdcmd(0xc0); 
        delay(10);
        lcdstring(“Area : RJY”);
        delay(10);
    }
     
    //function to store area of bus  2
    void bus2()
    {
        lcdcmd(0x01); 
        delay(10);
        lcdcmd(0x80);
        delay(10);
        lcdstring(“Busnumber : 2” );
        delay(10);
        lcdcmd(0xc0);  
        delay(10);
        lcdstring(“Area : KKD”);
        delay(10);
     }
     
    //Function to  store  Bus 3 details
    void bus3()
    {
        lcdcmd(0x01);  
        delay(10);
        lcdcmd(0x80); 
        delay(10);
        lcdstring(“Busnumber : 3” );
        delay(10);
        lcdcmd(0xc0);
        delay(10);
        lcdstring(“Area : ABC”);
        delay(10);
      }
     
    //Function to display the unauthorized entry of buses into the arena of the college
    void nomatch()
    {
        lcdcmd(0x01); 
        delay(10);
        lcdcmd(0x80);  
        lcdstring(“Unauthorised entry”);
        delay(10);
    }
     
    // function to display time from the RTc
    void rtc()
    {
        unsigned char hr,min,sec;
        hr=XBYTE[4];
        bcdconv(hr);
        delay(10);
        lcddata(‘:’);
     
        min=XBYTE[2];
        bcdconv(min);
        delay(10);
        lcddata(‘:’);
     
        sec=XBYTE[0];
        bcdconv(sec);
    }
     
    //Function to convert hex values into BCD
    void bcdconv(unsigned char v)
    {
      unsigned char x,y;
      x=v&0x0F;
      x=x|0x03;
      y=v&0xF0;
      y=y>>4;
      y=y|0x30;
      lcddata(y);
      lcddata(x);
    }
     
    //LCD initialisation function
    void lcdinit()
    {
         lcdcmd(0x38);  
         delay(1);
         lcdcmd(0xE0);  
         delay(1);
         lcdcmd(0x01); 
         delay(1);
         lcdcmd(0x06);  
         delay(1);
    }
     
    //function to display string
    void lcdstring(unsigned char *str)
    {
        int i=0;
        for(   ;str!=’’;i++)
          { 
              lcddata(str);
               delay(1);
            }
    }
     
     // lcd function to display a single character 
    void lcddata(unsigned char value)
    {
        P1 = value;
        rs= 1;
        rw=0;
        e=1;
        delay(1);
        e=0;
    }
     
     
    void lcdcmd(unsigned char value)
    {
        P1 = value;
        rs= 0;
        rw=0;
        e=1;
        delay(1);
        e=0;
    }
    // Function to initialize the Real Time clock
    void rtcinit()  
    {
        delay(200);
        XBYTE[10]=0x20;  //turn ON the oscillator
        XBYTE[11]=0x83;  
        XBYTE[0]=0x55;
        XBYTE[2]=0x58;
        XBYTE[4]=0x16;
        XBYTE[7]=0x19;
        XBYTE[8]=0x10;
        XBYTE[9]=0x04;
        XBYTE[11]=0x03;
    }
     
    //Function to generate delay 
    void delay(unsigned int count)
    {
      unsigned int i,j;
      for(i=0;i<count;i++)
        for(j=0;j<1275;j++);
    }
     
    February 21, 2012 at 3:52 pm #7191
    phanindra nath
    Participant

    i couldnt find any mistake, so i copied the your entire code into my Keilproject, I didnt get any warninge messages. Hex file is sucessfull created

    February 26, 2012 at 8:26 am #7197
    shanthi
    Participant

    ok thank u so much..i need a help in the same code that the code is not applying for switch case..it is showing me an error..

    i tried changing the second ifelse ladder with switchcase bt isnt working…could anyone help me with this

    March 4, 2012 at 4:20 pm #7246
    phanindra nath
    Participant

    i think you have used SWITCH as follows-

     

    switch(n)

    {

     case v1: statements;

     case v2: statements;

     case v3: statements;

     case vn: statements;

     default: 

    }

    did you write code like above code?

    if so then its WRONG because CASE identifiers should be CONSTANTs .

    you cannot write “case v1”  because ‘v1’ is a variable.

     

    instead you can write as 

     ……

      case 11: statements;

      case 12: statements;

    …….

    i hope you understand.

    if you havesome time please check my blog

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Fun with AI and swordfish basic June 22, 2025
  • Microinverters and storeage batteries? June 22, 2025
  • FFC connector white June 22, 2025
  • Is AI making embedded software developers more productive? June 22, 2025
  • Can I make two inputs from one?? June 22, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise