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 CCS Technical Support

Interrupt Priority

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



Joined: 27 Aug 2008
Posts: 7

View user's profile Send private message

Interrupt Priority
PostPosted: Tue Nov 25, 2008 2:12 am     Reply with quote

Hi,
In CCS how to assign interrupt priority for a function? Thanks in advance for your help.
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Tue Nov 25, 2008 2:49 am     Reply with quote

Interrupt priority level is set by hardware. It depends if your PIC is capable of having multiple priority levels; this is possible on the 18 series and higher PICs.

Have a look at the Interrupts section in the CCS manual, particularly the directive #device high_ints .

Read Ttelmah's post:
http://ccsinfo.com/forum/viewtopic.php?t=36497&highlight=priority
http://ccsinfo.com/forum/viewtopic.php?t=36218&highlight=priority

Rohit
Ttelmah
Guest







PostPosted: Tue Nov 25, 2008 3:13 am     Reply with quote

There are two sorts of interrupt 'priority'.
The hardware form, is only available on the 18 or latter chips, and is what Rohit is referring to.
Separately, there is a 'software' form, which adjusts the _order_ in which the interrupt flags are checked in the handlers. This is set by two things. First, the order that the interrupts are declared. Basically if you declare an interrupt first in the code, it will be checked before other interrupt handlers declared latter. Alternatively, you can use the #priority declaration, which allows you to specify this 'checking' order.
So you can actually set the order with which interrupts are scanned, inside each of the two hardware levels, by using combinations of these.

Best Wishes
esakki



Joined: 27 Aug 2008
Posts: 7

View user's profile Send private message

Intterupt Priority
PostPosted: Wed Nov 26, 2008 10:34 pm     Reply with quote

Hi,
Thanks for your reply. i wil do with this reference. thanks lot you all.
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