Enable/Disable are for PBP ON INTERRUPT GOTO
For DT-INTS you have
@ INT_ENABLE IntSource
and
@ INT_DISABLE IntSource
You could disable all interrupt by clearing INTCON GIE too. Used with care this could work.
Enable/Disable are for PBP ON INTERRUPT GOTO
For DT-INTS you have
@ INT_ENABLE IntSource
and
@ INT_DISABLE IntSource
You could disable all interrupt by clearing INTCON GIE too. Used with care this could work.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
It protect what's in between DISABLE and ENABLE, so yes if your Gosub are in between them, they will be "protected" as well.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Woohoo! Go TEAM Go!
And just to add more info ...
When a 16F PIC is servicing an interrupt, no other interrupts can occur until the current one is finished. The GIE bit is cleared automatically by hardware at the start of the interrupt. Global ints are then re-enabled when it executes a RETFIE (return from interrupt) at the end of the handler.
So there's no need to try to keep a handler from being interrupted, because it can't.
With ON INTERRUPT, the actual Hardware INTERRUPT was serviced long before it gets to the handler, so you need to disable/enable with those.
DT
Shucks, last week I cudnt even spel PIC, and now I are programin one!
Data Sheets and Application Notes are wonderful things, but sometimes there's no substitute for a good teacher(s) to help explain things, fill in the details, or to just shove me over a hurdle that I can't find my way around...
I really appreciate ALL the folks who've taken time to help... but especially Darrel for creating good things like DT_INTS and then having the patience to put up with all the silly questions we newbies will certainly have about it!
THANKS!
It's been a good day. I learned a lot.
Steve
Hi all,
I've been working in a project similar to byte_butcher's but using PBP only (I don't know any MPASM). My touch buttons work nicely but when I try to use GOSUB inside the ISR routine somehow PBP doesn't like it. I have my sub-routines outside the Disable-Enable of the ISR routine but it doesn't work.
Am I missing something here?? Darrel said it is posible to call sub-routines when the interrupts are disable.
Thanks in advance for any help.
Robert
Bookmarks