Hi,
I'm not a 18F Specialist ...
but smells Some Banking issues ... ???
Alain
Hi,
I'm not a 18F Specialist ...
but smells Some Banking issues ... ???
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
- The constants FSR0, FSR1 and FSR2, are only for use with the LFSR (Load File Select Register) opcode.
They equate to 0, 1 and 2 respectively.
Using them with MOVFF, causes it to save/restore the memory at locations 0, 1 and 2, which are normally PBP's system variables.
On 18F's, the FSR's have 12-bit addresses, so it takes 2-bytes to hold each one.
For FSR0, the actual values are in FSR0L and FSR0H. If you are saving them, you need to save both.
But you only need to save the FSR's if they are also used by the interrupt handler. If you're handler doesn't use them ... it's just waisting time.
- The MOVWF opcode, requires that the BANK be set first, but you can't set the bank at that point, because the BSR register hasn't been saved yet.
Use MOVFF WREG, wsave instead.
- If you are using High Priority interrupts? Then you don't need to save WREG, STATUS or BSR. They are automatically saved by the CPU when the interrupt occurs.
Then use RETFIE 1 (FAST return).
- You are calling routines with underscores in front of them.
You aren't calling BASIC code from an ASM interrupt are you?
DT
Well then I must only use a RETFIE FAST and no "PUSH/POP" anythings in IRQ routine.
as :
Is possible getback any confirm or suggestion ?Code:' Assembly language INTERRUPT handler Asm GlbInt ; ; RXF btfsc _RC1IF call _RxIRQ ; Routine Interrupt EUSART1 Receiver (in basic code) ; T0F btfsc _TMR0IF call _timer0IRQ ; Routine Interrupt Timer0 (in basic code) ; T1F btfsc _TMR1IF call _timer1IRQ ; Routine Interrupt Timer1 (in basic code) ; ;************************************************************************************************** ; Restore RETFIE FAST ; EndAsm
Thank'you very much.
Since you are trying to call BASIC language routines from an ASM interrupt ... there is only one thing I can recommend....
DT_INTS-18
http://darreltaylor.com/DT_INTS-18/home.html
<br>
DT
Bookmarks