View previous topic :: View next topic |
Author |
Message |
Phil_PIC
Joined: 10 Nov 2009 Posts: 2
|
Interrupts in multi - compilation units |
Posted: Mon Oct 10, 2011 4:40 pm |
|
|
Hi all,
I an trying to develop a project using multiple c files.
Data_in.c : receives data via RS22. I basically use #INT_RDA in this file
main.c : Reads data from Data_in.c
I cannot get the interrupt to work when I use Data_in.c
Note: I enable all interrupts in main.c
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
I appear to be missing some option/code to link these 2 files correctly... Any help greatly appreciated....
Thanks
Phil |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Oct 10, 2011 5:18 pm |
|
|
post the relevant code
and help might become available.
BTW;
i might be wrong but i clear the ints i will use
B 4 i enable them. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19510
|
|
Posted: Tue Oct 11, 2011 1:49 am |
|
|
I'd have to say I wouldn't even try!......
Multiple compilation units, is a part of CCS, that has always been unreliable. It now does work for standard stuff, but I would expect problems trying to use it for the interrupt handler code. Problem is that this has to be built into the table at the bottom of memory, before the main code is loaded, and can't be relocated like a normal routine. Seriously, don't go looking for trouble, just include the file containing the interrupt handler(s) into your main, and only link in normal stuff....
Best Wishes |
|
|
|