The test continue......
Basically I tried something as simple as not adding the return in my ASM interrupt routine.
Change to this:
--------------------------------------------------------------------------
; Save W, STATUS and PCLATH registers
myint movwf wsave
swapf STATUS, W
clrf STATUS
movwf ssave
movf PCLATH, W
movwf psave
; Insert interrupt code here
; Save and restore FSR if used
bsf _led ; Turn on LED
endasm
SOUND PortB.1,[120,160]
PAUSE 3000
GOTO Main
-------------------------------------------------------------------------
I'm guessing I don't need to save the registers up there, but for now I guess it doesn't hurt.
So now it simply continues executing the code below it which is what I'm looking to do.
The thing that I do question at this point is, are there any register I should be saving and restoring?
Any comments on this approach?
Bookmarks