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

Interrupt Priority PIC18F67K22

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



Joined: 28 Mar 2020
Posts: 5
Location: York, PA

View user's profile Send private message

Interrupt Priority PIC18F67K22
PostPosted: Wed Apr 29, 2020 11:12 am     Reply with quote

How do I configure interrupt priorities (IPEN = 1) for the pic18f67k22 microcontroller? I am using the PCWH compiler.
I do not see it on the IDE project wizard, or find it on the CCS C compiler manual.

Also, my code includes use of the modbus rtu driver. It is factory configured to interrupt on RDA from the uart. Can it be re-configured to use hi/lo interrupt priority and set as low priority?

Thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed Apr 29, 2020 11:27 am     Reply with quote

It is in the manual.

Add the line:

#device HIGH_INTS=TRUE

near the start of your code (just after the include for the processor).
This turns on IPEN.

Then declare your INT_RDA with:

#INT_RDA HIGH

This will then be a high priority interrupt, with separate locations used
to store the regsiters.

One caveat. INT_EXT does not have a priority control bit, and if this
is used it will always be a high priority interrupt.
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