CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Interrupts in multi - compilation units

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Phil_PIC



Joined: 10 Nov 2009
Posts: 2

View user's profile Send private message

Interrupts in multi - compilation units
PostPosted: Mon Oct 10, 2011 4:40 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Mon Oct 10, 2011 5:18 pm     Reply with quote

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: 19337

View user's profile Send private message

PostPosted: Tue Oct 11, 2011 1:49 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group