Is it possible to write isr in a user defined header file ?

Status
Not open for further replies.
You should read the XC8 User manual, I think you will find answers to your questions there. Normally you write code in .c files, and use the header file .h for references, macros and prototypes, in a multi source file project.
 

yes u can wriye ISR routine anywhere but after defibed controller's architecture.
 

it is usual to place code in .c files with function prototypes and variable declarations etc in header file.
placing actual code such as the definition of an isr (or any other function definition) in a header file could cause problems if you include the header files in more than one .c file in a project - you will get multiple definitions of a symbol at link time
 
yes horace1 is right. You can write in header file but there will headache later.
 

thanks for the reply horace1 and embpic..
i wrote the program and the compiler accepted it as the header file but the o/p is different from what i expect..
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…