Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Interrupts per second (http://www.chiefdelphi.com/forums/showthread.php?t=25172)

steven114 12-02-2004 11:53

Interrupts per second
 
Anyone know how many interrputs per second the RC can handle? The Microchip docs don't seem to say and I did a search but could not locate any information on the forum. Thanks for any information.
Steven

Mark McLeod 12-02-2004 12:26

Re: Interrupts per second
 
Quote:

Originally Posted by steven114
Anyone know how many interrputs per second the RC can handle? The Microchip docs don't seem to say and I did a search but could not locate any information on the forum. Thanks for any information.
Steven

Check this thread http://www.chiefdelphi.com/forums/showthread.php?t=24463

steven114 12-02-2004 12:43

Re: Interrupts per second
 
Thanks, don't know why my searches missed that...

Mark McLeod 12-02-2004 12:47

Re: Interrupts per second
 
Quote:

Originally Posted by steven114
Thanks, don't know why my searches missed that...

I actually searched for the number "5000".
It can be pretty hard to search for things on these forums unless you can remember a unique word or value from a thread, since the same terms get used over and over even if they aren't directly related to the thread topic.
I have trouble finding my own posts where I've previously posted an answer or code!

steven114 12-02-2004 19:37

Re: Interrupts per second
 
Yeah, when I searched for interrupts per second, it eliminated per second entirely and searched for just interrupts... did me a whole lot of good ;)

emusteve 13-02-2004 13:48

Re: Interrupts per second
 
Actually, it depends entirely on how long it takes to execute your Interupt Handler code. If you keep triggering interupts before the last one finished, you end up interupting the interupt. Do this too many times and you blow the stack and the thing crashes.

So, the REAL question is: How much time has IFI given us to service an interupt without blowing up their code?

Chow for now,
Steve

steven114 13-02-2004 18:59

Re: Interrupts per second
 
I figured that, since the interrupt simply calls a function which increments a variable, I shouldn't have any trouble with that...

KenWittlief 13-02-2004 20:12

Re: Interrupts per second
 
Most processors block further interrupts on a pin once the first one has been received

so unless you re-enable interrupts inside the interrupt routine, it will not be able to interrupt the interrupts - usually you enable them in the last instruction before you return, or in some processors, the return-from-interupt instruction itself re-enables them

emusteve 16-02-2004 00:34

Re: Interrupts per second
 
True, except you are dealing with two layers of interupts here. The high priority interupt can interupt your low priority interupt. And since we don't know exactly what IFI is doing with their code...

I'm learning a LOT about what doesn't work with this machine.

steven114 16-02-2004 14:42

Re: Interrupts per second
 
Quote:

Originally Posted by KenWittlief
in some processors, the return-from-interupt instruction itself re-enables them

I think RETFIE does this; I seem to remember reading it in the docs...

Jeff McCune 17-02-2004 13:59

Re: Interrupts per second
 
Quote:

Originally Posted by emusteve
Actually, it depends entirely on how long it takes to execute your Interupt Handler code. If you keep triggering interupts before the last one finished, you end up interupting the interupt. Do this too many times and you blow the stack and the thing crashes.

So, the REAL question is: How much time has IFI given us to service an interupt without blowing up their code?

Chow for now,
Steve

Interrupts are disabled while executing an interrupt handler. This is why it's important to keep interrupt routines small, so you don't miss events.


All times are GMT -5. The time now is 07:02.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi