PDA

View Full Version : DT ASM Interrupts



MOUNTAIN747
- 22nd February 2018, 17:33
I am working with others on THE BOOK of DT INTERRUPTS. I have been reading some of Darrel's threads on ASM Type interrupts and it sounds to me that, If you are using ASM interrupts only, you don't have to INCLUDE ReEnterPBP.bas Can anyone confirm this? Comments please.
Wayne

tumbleweed
- 22nd February 2018, 17:52
That's correct.

ReEnterPBP is used to save/restore the state of PBP, which you don't need to do if you're using asm and not using PBP statements in the ISR handler.

MOUNTAIN747
- 22nd February 2018, 18:02
Thanks tumbleweed, now I can put a statement in TYPES of interrupts that states "When using ASM interrupts only, the INCLUDE ReEnterPBP.bas file is not needed."

mpgmike
- 22nd February 2018, 20:49
Some PICs have automatic context saving while others do not. Might want to mention that. It's listed in the appropriate data sheets.

richard
- 22nd February 2018, 23:38
its also worth noting that if you only have 1 interrupt and that it is a asm type then
DEFINE INTHAND
is quicker and leaner than dt-ints ,and just as easy to accomplish especially if chip has auto context save

MOUNTAIN747
- 23rd February 2018, 01:49
Thanks guy for your comments.
Richard, so for those of us who don't know about DEFINE INTHAND, Please give a bref explanation. I see that DEFINE INTHAND followed by INT_ENTRY is at the beginning of DT_INT-14.bas. It is not mentioned again in the code. INT_ENTRY saves everything and more. So I ask, how do you set up for a single ASM interrupt with INTHAND?

richard
- 23rd February 2018, 02:11
if you look at this thread you can see how I used the same isr with and without dt_ints
http://www.picbasic.co.uk/forum/showthread.php?t=23874



I see that DEFINE INTHAND followed by INT_ENTRY is at the beginning of DT_INT-14.bas

INT_ENTRY is the name of dt_ints "master" isr your isr{'s} are then called from that



So I ask, how do you set up for a single ASM interrupt with INTHAND?





there is an entire section of the pbp manual dedicated to this subject , its clearly written , concise and
covers the subject thoroughly . I would have nothing to add that is not covered therein handsomely