#include <delays.h>
#define delay_ms
Do you already have a delays.h file???
If yes, then check if the function you call for delay i.e delay_ms() is already defined in it.
If it is defined then the compiler should already throw multiple declarations/definitions errors during the compiling stage.
In case the delays.h file does not have the definition of delay_ms(),
You are not defining it in the main code eitherWhich means, the code is working as it is supposed to, not as you expect it to.
The led is blinking too fast for you to distinguish between on and off.
Hence it is staying lit.
Define what you want the delay_ms() to do first..
and yes, include the
#define _XTAL_FREQ xxxxxx
in your code too..
Actually getting a book on C programming should be your priority first.
PS: There is a quirk to getting the delay_ms() function running by default in Hitech C.
Hitech C has the definition for _delay_us() and _delay_ms() in pic.h file, but the functions are not enabled for running in std mode.
comment the
#ifdef __PICCPRO__
#endif
encapsulating the definitions for _delay_ms() and _delay_us() and you can use the delay subroutines even in std mode.