Code:
'::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
<font color=red>INT_Handler RX_INT, _Get_char, PBP, yes</font color>
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
'::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
<font color=blue>@ INT_ENABLE RX_INT ; enable UART RX interrupt
</font color>
The code in red is the receive interrupt, open DT-INTS and READ the options available, in amongst those are RB and INT choices, add them the way Darrel wrote them, into your interrupt macro, then enable them as done in Blue.
Example:
Code:
'::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RX_INT, _Get_char, PBP, yes
INT_HANDLER INT_INT, _MyNewLabel, PBP,yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
'::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
@ INT_ENABLE RX_INT ; enable UART RX interrupt
@ INT_ENABLE INT_INT ;enable External Interrupts
Here is your selection snipped from DT-Ints14
Code:
#define INT_INT INTCON,INTF ;-- INT External Interrupt
#define RBC_INT INTCON,RBIF ;-- RB Port Change Interrupt
#define TMR0_INT INTCON,T0IF ;-- TMR0 Overflow Interrupt 16F
#define TMR1_INT PIR1,TMR1IF ;-- TMR1 Overflow Interrupt
#define TMR2_INT PIR1,TMR2IF ;-- TMR2 to PR2 Match Interrupt
#define TX_INT PIR1,TXIF ;-- USART Transmit Interrupt
#define RX_INT PIR1,RCIF ;-- USART Receive Interrupt
#define CMP_INT PIR2,CMIF ;-- Comparator Interrupt
#define EE_INT PIR2,EEIF ;-- EEPROM/FLASH Write Operation Interrupt
#define BUS_INT PIR2,BCLIF ;-- Bus Collision Interrupt
#define PSP_INT PIR1,PSPIF ;-- Parallel Slave Port Read/Write Interrupt
#define AD_INT PIR1,ADIF ;-- A/D Converter Interrupt
#define SSP_INT PIR1,SSPIF ;-- Master Synchronous Serial Port Interrupt
#define CCP1_INT PIR1,CCP1IF ;-- CCP1 Interrupt
#define CCP2_INT PIR2,CCP2IF ;-- CCP2 Interrupt
INT_Handler RX_INT, _Get_char, PBP, yes tells the PIC<b> WHICH</b> interrupt to use and <b>WHICH</b> label to jump to.
Bookmarks