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 / MISSING FUNCTION PROTOTYPE

MISSING FUNCTION PROTOTYPE

|

Microcontroller › 8051 › MISSING FUNCTION PROTOTYPE

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 3 months ago by Hari Prasaath K.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 27, 2017 at 6:40 pm #4631
    Achu
    Participant

    THIS IS MY PROG THAT I HAVE MAKE FOR MY MINI PROJECT BUT KEIL IS GIVING ERROR THAT

    1)mini project.c(49): error C267: 'lcddata': requires ANSI-style prototype

    2)mini project.c(49): warning C206: 'lcddata': missing function-prototype

    I am really weak in coding and i dont know!! hope experts can help me with this….

    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);
    lcdmd(0xc0);
    for(i=7;i<13;i++)
    lcddata(w);
    for(i=13;i<24;i++)
    lcddata(w);
    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;
    }
    }
     
    Please Help me!! 
    March 30, 2017 at 12:20 pm #14535
    Hari Prasaath K
    Participant

    You have not created the function for 'lcddata'. only function calling is there. You should write a function defenition and prototype for lcddata. Look the link for tutorial.

    https://www.engineersgarage.com/tutorials/keil-interfacing-programs-8051?page=4

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

RSS Recent Posts

  • The Analog Gods Hate Me July 14, 2025
  • Impact of Tariffs on PCB Fab July 14, 2025
  • More fun with ws2812 this time XC8 and CLC July 14, 2025
  • I Wanna build a robot July 14, 2025
  • Wierd makita battery July 14, 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