I am having difficultly declaring a global variable that can be seen by the interrupt routine and main.  The program compiles correctly but each function has a unique copy of the variable.  The only work around that I have found it to fix the variable to a specific address location.

 

I

     xdata unsigned int interruptcount   (unique variables for each function, unless they are in same file)

 

     xdata at 0x2000 unsigned int interruptcount (all functions use same variable)

 

I would appreciate any assistance.

 

Regards,

 

Bob