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

PIC18F Separate high and low priority interrupts

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



Joined: 18 Oct 2007
Posts: 2

View user's profile Send private message

PIC18F Separate high and low priority interrupts
PostPosted: Thu Oct 18, 2007 9:56 am     Reply with quote

By using the #build(interrupt=NEWADDRESS) the interrupt dispatcher is located at NEWADDRESS.
I am using the High and Low priority interrupts.
How can I force the compiler to separate the high priority interrupt dispatcher to one Vector and the low priority interrupt dispatcher to a different vector?
Ttelmah
Guest







PostPosted: Thu Oct 18, 2007 3:03 pm     Reply with quote

It does already. The low priority dispatcher is always put 0x10 addresses higher than the high priority one. So, if the 'FAST', or 'HIGH' keywords are used, normally the high priority goes at address 8, and the low priority dispatcher at address 0x18. If you use the build statement, it sets the address of the high priority dispatcher, and the low priority one is automatically placed 0x10 locations higher (as required by the hardware).

Best Wishes
Bobhjr



Joined: 18 Oct 2007
Posts: 2

View user's profile Send private message

PostPosted: Fri Oct 19, 2007 5:57 am     Reply with quote

Thanks for the input, I understand what you are saying.
Using #build it groups the two dispatchers together, but I want to separate them.
For example, I want to place the High Priority dispatcher at address 0x0020 and the Low Priority dispatcher at address 0x1000.

From there I could put a “goto 0x0020” at address 0x0008 to redirect the high priority hardware interrupt to the high priority dispatcher.
From there I could put a “goto 0x1000” at address 0x0018 to redirect the low priority hardware interrupt to the high priority dispatcher.
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