As long as none of the complex math or logical conditions are in the Interrupt handlers themselves, ...
you can open the ReEnterPBP.bas file and comment the ERROR "Temp variables exceeding T4" line with a semicolon (;).
As long as none of the complex math or logical conditions are in the Interrupt handlers themselves, ...
you can open the ReEnterPBP.bas file and comment the ERROR "Temp variables exceeding T4" line with a semicolon (;).
DT
Just to understand it correctly, I want to ask you few more questions:
1) Can I use the following statements:
2) Will the next interrupt only be enabled after the code encounters @INT_ENABLE (Regardless of where I put it in the code)?Code:ToggleLED1: goto main ' Is it ok to send the program to a label. Also no complex match or logical conditions here @ INT_RETURN main: 'All complex code and calculations are here @INT_ENABLE INT_INT 'Can I place this statement here? @SLEEP 'Since my application is battery powered, so PIC to sleep if no command is present Goto main
BIG thanks for the help upto now.
Last edited by Megahertz; - 22nd December 2009 at 13:59.
NO! That is not OK at all.
And if all you want to do is restart the program after an interrupt, then you don't even need interrupts.
<hr>
Once enabled, interrupts will continue to fire.
They do not need to be enabled again, unless manually DISABLED in your program.
DT
Well, I don't think I can manage without interrupts. In my code the program waits for serial data on one pin from an RF receiver. And if RI pin of my modem attached to RB0 pin goes low, the code should check any sms received as well. So, interrupt is needed..... if all you want to do is restart the program after an interrupt, then you don't even need interrupts.
How I can do that-disable the interrupts (Is it by adding DISABLE before the code) ? and also can they be enabled again when needed by using @INT_ENABLE?Once enabled, interrupts will continue to fire.
They do not need to be enabled again, unless manually DISABLED in your program.
Regards
ENABLE and DISABLE have no effect with DT_INTS.
Those are only for ON INTERRUPT.
With DT_INTS there are two commands ...
They can be used anywhere in your program.Code:@ INT_ENABLE TMR1_INT @ INT_DISABLE TMR1_INT
Once disabled, you will not receive any interrupts from that source or peripheral until you execute another @ INT_ENABLE.
When you INT_ENABLE, the flag is automatically cleared so you don't get an interrupt immediately if the flag was set.
<br>
DT
Thanks for the quick relply, just some last bit of confusion left:
1) When interrupt will happen while waiting for an RF signal - How do I send the code to go from ISR to main label?
2) Can I disable the interrupt in the ISR? for eg:
Code:_ToggleLED: @INT_Disable goto main @INT_Return ' Should I use this if I am sending the code to another label?
Like I said before.How do I send the code to go from ISR to main label?
You should NOT jump out of an interrupt handler to the main loop.
<br>
DT
Bookmarks