Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interrupt complications

Status
Not open for further replies.

aviv6371

Member level 2
Joined
Jul 7, 2006
Messages
45
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,574
hi,

i m programming Pic 16f877 with c and wondering what happens when an interrupt is happenning when the program is proccessing an interrupt call.

avi.
 

if the interrupt remain enable when the program is proccessing an interrupt call, and if the later interrupt has a higher priority than current interrupt, then microcontroller will serve the later interrupt.
 

hi,

i am talking aboat one interrupt source !!
what the program will do if an interrupt of the same source is asking to branch.
will the program go immediatly to the start of the interrupt or avoid the interrupt completly and finish the first interrupt.

avi.
 

My above statement still valid for single source interrupt request, in that case the later interrupt doesn't has higher priority than current interrupt!

So the later interrupt request take effect after the first one already served.
 

In normal situation once the interrupt occure, you should disable interrupt and treat the current interrupt. As long the interrupt is treated it can't came a second interrupt from the same source, and even it came will be lost.
 

hi,

first thanx for answering so quicklly.
my next question would be naturally how to translate these information to
c instructions ???

avi.
 

melc wrote :
once the interrupt occure, you should disable interrupt and treat the current interrupt.
Disable interrupt at the most beginning of the ISR (Interrupt Service Routine) and re-enable interrupt at the end of ISR.

I'm not a PIC player, I can't give you more specific guidance.
 

Actually, it depends on how you code it. A PIC will automatically disable further interrupts when it enters the interrupt routine, but you can enable interrupts near the beginning of the routine (clear the interrupt flags and set the GIE bit). Be careful to make allowances for context saving of the interrupted interrupt routine.

-jonathan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top