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

16F628 and multi interrupt...

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







16F628 and multi interrupt...
PostPosted: Fri Jan 23, 2004 2:07 pm     Reply with quote

I am using a 16F628.
I have two interruption, one with the timer0 every 200 µs and one with the port B. what happens when the two occur. Which has the priority and what appens when there is an interup on portb when we are in the timer0 isr?

Thank you
Guest








Re: 16F628 and multi interrupt...
PostPosted: Thu Dec 29, 2005 1:22 am     Reply with quote

fredbor wrote:
I am using a 16F628.
I have two interruption, one with the timer0 every 200 µs and one with the port B. what happens when the two occur. Which has the priority and what appens when there is an interup on portb when we are in the timer0 isr?

Thank you
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Dec 29, 2005 3:06 am     Reply with quote

The PIC16F628 interrupt handling is non rentrant. When an interrupt occurs, interrupts are disabled by the PIC while the interrupt is being processed. If another interrupt condition occurs while inside the handler, the appropriate interrupt flag bit is set but not acted upon. When the interrupt handler completes processing of the original interrupt condition the PIC will return from interrupt automatically re-enabling interrupts. In the case where another interrut flag has been set and the interrupt condition has been enabled, the PIC will immdeiately pass control to the interrupt handler.

This process will repreat until all outstanding interrupts have been processed.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
DragonPIC



Joined: 11 Nov 2003
Posts: 118

View user's profile Send private message

PostPosted: Thu Dec 29, 2005 8:56 am     Reply with quote

if both happen at the same time, priority may be set by the #PRIORITY Directive. You can also view priorty in the compiled list file where interrupt flags are checked.
_________________
-Matt
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