We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
There is on need to add header files to the project - the compiler will find them automatically via the Include Paths that you specify in your project settings:
http://www.keil.com/support/man/docs/uv4cl/uv4cl_dg_c51.htm
They will then appear as dependencies in the Project window