Re: PIC18F67K40 DT_INTS that really work.
Csantex, I do not see where you are setting the HIGH and LOW priority interrupts. This is the code I use for setting HIGH and LOW priority inetrrupts.
DEFINE USE_LOWPRIORITY 1
INCLUDE "C:\PBP\INCLUDES\DT_INTS-18.bas" ' Interrupt Control routines
INCLUDE "C:\PBP\INCLUDES\ReEnterPBP-18.bas" ' Interrupt Control routines
INCLUDE "C:\PBP\INCLUDES\ReEnterPBP-18LP.bas" ; Include if using Low Pr. PBP INTS
'************************************************* ********************
asm
;----[High Priority Interrupts]-----------------------------------------------
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _TIMR1, PBP, yes
endm
INT_CREATE ; Creates the High Priority interrupt processor
;----[Low Priority Interrupts]------------------------------------------------
INT_LIST_L macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TX1_INT, _UARTTX1, PBP, no
INT_Handler RX1_INT, _UARTRX1, PBP, no
INT_Handler TX2_INT, _UARTTX2, PBP, no
INT_Handler RX2_INT, _UARTRX2, PBP, no
endm
INT_CREATE_L ; Creates the LOW Priority interrupt processor
ENDASM
@ INT_ENABLE RX1_INT ; Enable RX UART Interrupts
@ INT_ENABLE RX2_INT ; Enable RX UART Interrupts
@ INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts
GOTO STARTLOOP
'************************************************* ********************
' Interrupt Routines *
'************************************************* ********************
'************************************************* ********************
TIMR1: 'INTERRUPT SERVICE ROUTINE FOR TIMER 1
'************************************************* ********************
@ INT_RETURN
'************************************************* ********************
UARTRX1: 'INTERRUPT SERVICE ROUTINE FOR UART RECEIVER
'************************************************* ********************
@ INT_RETURN
'************************************************* ********************
UARTTX1: 'INTERRUPT SERVICE ROUTINE FOR UART TRANSMITTER
'************************************************* ********************
@ INT_RETURN
'************************************************* ********************
UARTRX2: 'INTERRUPT SERVICE ROUTINE FOR UART RECEIVER
'************************************************* ********************
@ INT_RETURN
'************************************************* ********************
UARTTX2: 'INTERRUPT SERVICE ROUTINE FOR UART TRANSMITTER
'************************************************* ********************
@ INT_RETURN
'************************************************* ********************
' Subroutines *
'************************************************* ********************
Dave Purola,
N8NTA
EN82fn
Bookmarks