Code:
ASM
#define INT_INT INTCON,INTF ;-- INT External Interrupt
#define RBC_INT INTCON,RBIF ;-- RB Port Change Interrupt
#define RAC_INT INTCON,RAIF ;-- RA 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
ENDASM
asm
INT_Source macro IFR, IFB, IER, IEB
if ((IflagReg == IFR) && (IflagBit == IFB))
list
INT_Flag_Reg = IFR
INT_Flag_Bit = IFB
INT_Enable_Reg = IER
INT_Enable_Bit = IEB
Found = YES
endif
; nolist
endm
endasm
asm
;-------------------------------------------------------------------------------
GetIntInfo macro IflagReg, IflagBit
Found = NO
; nolist
ifdef INTF ;----{ INT External Interrupt }----------------[INTCON, INTF]---
INT_Source INTCON, INTF, INTCON, INTE
endif
ifdef RBIF ;----{ RB Port Change Interrupt }--------------[INTCON, RBIF]---
INT_Source INTCON, RBIF, INTCON, RBIE
endif
ifdef RAIF ;----{ RA Port Change Interrupt }--------------[INTCON, RAIF]---
INT_Source INTCON, RAIF, INTCON, RAIE
endif
ifdef T0IF ;----{ TMR0 Overflow Interrupt }-------------[INTCON, TMR0IF]---
INT_Source INTCON, T0IF, INTCON, T0IE
endif
ifdef TMR1IF ;----{ TMR1 Overflow Interrupt }---------------[PIR1, TMR1IF]---
INT_Source PIR1, TMR1IF, PIE1, TMR1IE
endif
ifdef TMR2IF ;----{ TMR2 to PR2 Match Interrupt }-----------[PIR1, TMR2IF]---
INT_Source PIR1, TMR2IF, PIE1, TMR2IE
endif
ifdef TXIF ;----{ USART Transmit Interrupt }----------------[PIR1, TXIF]---
INT_Source PIR1, TXIF, PIE1, TXIE
endif
ifdef RCIF ;----{ USART Receive Interrupt }------------------[PIR1 RCIF]---
INT_Source PIR1, RCIF, PIE1, RCIE
endif
ifdef CMIF ;----{ Comparator Interrupt }--------------------[PIR2, CMIF]---
ifdef PIR2
INT_Source PIR2, CMIF, PIE2, CMIE
else
INT_Source PIR1, CMIF, PIE1, CMIE
endif
endif
ifdef EEIF ;---{ EEPROM/FLASH Write Operation Interrupt }---[PIR2, EEIF]---
ifdef PIR2
INT_Source PIR2, EEIF, PIE2, EEIE
else
INT_Source PIR1, EEIF, PIE1, EEIE
endif
endif
ifdef BCLIF ;----{ Bus Collision Interrupt }----------------[PIR2, BCLIF]---
INT_Source PIR2, BCLIF, PIE2, BCLIE
endif
ifdef PSPIF ;--{ Parallel Slave Port Read/Write Interrupt }--[PIR1, PSPIF]--
INT_Source PIR1, PSPIF, PIE1, PSPIE
endif
ifdef ADIF ;----{ A/D Converter Interrupt }------------------[PIR1, ADIF]---
INT_Source PIR1, ADIF, PIE1, ADIE
endif
ifdef SSPIF ;----{ Master Synchronous Serial Port Interrupt }--[PIR1, SSPIF]-
INT_Source PIR1, SSPIF, PIE1, SSPIE
endif
ifdef CCP1IF ;----{ CCP1 Interrupt }-------------------------[PIR1, CCP1IF]---
INT_Source PIR1, CCP1IF, PIE1, CCP1IE
endif
ifdef CCP2IF ;----{ CCP2 Interrupt Flag }--------------------[PIR2, CCP2IF]---
INT_Source PIR2, CCP2IF, PIE2, CCP2IE
endif
list
endm
list
ENDASM
Sure enough there's some other PIC with interrupt on PORTA change, I just never came across one... or maybe... but never used that feature yet
Bookmarks