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

PIC18 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
soundscu



Joined: 29 Jun 2007
Posts: 62
Location: Raleigh, NC

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

PIC18 high and low priority interrupts
PostPosted: Thu Jan 24, 2008 8:42 am     Reply with quote

Hi,

I need to use the PIC18 capability of high and low priority interrupts, where a high can interrupt a low. I've done this numerous times in projects I've written in assembler, but never in c. Is it even possible? If so, where is it documented?

Thanks for your help!
Jim
Ttelmah
Guest







PostPosted: Thu Jan 24, 2008 9:33 am     Reply with quote

#int_xxxx high

Look under the #INT_xxxx entry in the manual. Two keywords. 'FAST', and 'HIGH'. Both define high priority interrupts, the former, requires _you_ to save any registers used, and has no code to identify what device has interrupted (designed fo use for one device to give the fastest possible handling, if you know what you are doing), while 'high', generates the requires handler and parsing to support multiple high priority interrupts.
You also need to add the define:
#device HIGH_INTS=TRUE
Near the start of the code, to trigger the compiler to generate the extra code to handle these.

Best Wishes
soundscu



Joined: 29 Jun 2007
Posts: 62
Location: Raleigh, NC

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

PostPosted: Thu Jan 24, 2008 10:11 am     Reply with quote

Most excellent! That's exactly the direction I needed. Thank you!!

Jim
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