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

How to add header file to project

This is my code for time delay.

.#include<regx51.h>

#define led P2

void delay (int i);


void main()
{
    while (1)
    {
        led = 0x01;
        delay(500);
        led = 0x01;
        delay(500) ;
    }
}

void delay (int i)

{
   unsigned int j;

   for ( i = 0 ; j < i; j++);
}

.

I want to add header file #include "delay.h"

code

.#include<regx51.h>

#include "delay.h"

#define led P2

void main()
{
    while (1)
    {
        led = 0xFF;
        delay(1000);
        led = 0x00;
        delay(500) ;
    }
}

I have gone through this link http://www.keil.com/support/docs/1740.htm This link is not helping much. Please help me with correct source