Alain,
That's a dangerous way to do things.
It might blink an LED. But don't try to do anything else with it.
With the 12F675 being a 1K device, PBP doesn't even put the Context Stub in there.
Not that it would matter, because RESUME wouldn't restore it anyway.
WREG, STATUS, PCLATH all get lost. And any statement that gets interrupted, will stop doing whatever it was doing in mid-stream, it never returns to the original interrupt point.
If you really don't want Instant Interrupts, use ON INTERRUPT, or ASM interrupts.
Definitely DO NOT RESUME from an ASM type interrupt.<hr>

Originally Posted by
wlundonly
Hi all, I've been trying to get Darrel Taylor's Instant interrupts to work with a 12f675 with no luck. Will they work with a 12f675?
Hi Bill,
How's the Asparagus treating you?
Yes they will work, but depending on what you need to do, they may not be the optimal solution on such a small chip.
To use Basic Language interrupts with ReEnterPBP, it doesn't leave much RAM for the main program. It has to save EVERY PBP system variable, so it uses double the normal amount that PBP would use. PBP uses about 26 bytes, so ReEnterPBP needs another 26, plus a place to put the WREG, STATUS, PCLATH and any Temp(T?) vars that PBP creates for complex formulas. With only 64bytes of RAM, at best you will only be left with about 8 bytes for the main program to use.
DT_INTS-14 will work fine with Assembly language interrupts on a 675 because it only needs about 8 bytes, so there's no problem when it comes to ASM interrupts.
To get Instant interrupts with Basic Language working on a 12F675 ...
Open the DT_INTS-14.bas file and comment out the wsave lines. The 675 doesn't have any usable RAM in banks 1,2 or 3
Code:
' --- IF any of these three lines cause an error ?? ----------------------------
' Comment them out to fix the problem ----
' -- It depends on which Chip you are using, as to which variables are needed --
;wsave1 var byte $A0 SYSTEM ' location for W if in bank1
;wsave2 var byte $120 SYSTEM ' location for W if in bank2
;wsave3 var byte $1A0 SYSTEM ' location for W if in bank3
' ------------------------------------------------------------------------------
Then in the ReEnterPBP.bas file comment the T?_save variables.
Code:
; T1_Save VAR WORD
; T2_Save VAR WORD
; T3_Save VAR WORD
; T4_Save VAR WORD
Just remember that if you use Instant Interrupts on a different chip later, you will need to un-comment those lines.
HTH,
Bookmarks