PIC24F16KM104 interrupt vectors

Reset at 0x000000 (a GOTO to the program), then the interrupt vector table from 0x000004: first the 4 traps (non-maskable faults: oscillator failure, address error, stack error, math error…), then the 21 interrupt sources. Each vector is one program word holding its handler's address, so vector n is at 0x000004 + 2n, and IRQ n is vector n + 8. Each source has a flag in IFSx, an enable bit in IECx and a priority from 1 to 7 in IPCx (the Registers page lists them). In XC16 a handler is named after its vector: void __attribute__((interrupt, auto_psv)) _T1Interrupt(void).

VectorIRQ · addressNameHandlerSource
–0x000000RESETreset: main() after start-upReset
1trap · 0x000006OscillatorFail_OscillatorFailOscillator Fail Trap vector
2trap · 0x000008AddressError_AddressErrorAddress Error Trap Vector
3trap · 0x00000AStackError_StackErrorStack Error Trap Vector
4trap · 0x00000CMathError_MathErrorMath Error Trap Vector
8IRQ 0 · 0x000014INT0Interrupt_INT0InterruptINT0 - External Interrupt 0
9IRQ 1 · 0x000016CCP1Interrupt_CCP1InterruptCCP1 - Capture/Compare 1
10IRQ 2 · 0x000018CCP2Interrupt_CCP2InterruptCCP2 - Capture/Compare 2
11IRQ 3 · 0x00001AT1Interrupt_T1InterruptT1 - Timer1
15IRQ 7 · 0x000022CCT1Interrupt_CCT1InterruptCCT1 - CCP1 Timebase
16IRQ 8 · 0x000024CCT2Interrupt_CCT2InterruptCCT2 - CCP2 Timebase
19IRQ 11 · 0x00002AU1RXInterrupt_U1RXInterruptU1RX - UART1 Receiver
20IRQ 12 · 0x00002CU1TXInterrupt_U1TXInterruptU1TX - UART1 Transmitter
21IRQ 13 · 0x00002EADC1Interrupt_ADC1InterruptADC1 - A/D Converter 1
23IRQ 15 · 0x000032NVMInterrupt_NVMInterruptNVM - NVM Write Complete
24IRQ 16 · 0x000034MSSP1Interrupt_MSSP1InterruptMSSP1 - I2C/SPI Interrupt
25IRQ 17 · 0x000036MSSP1BCInterrupt_MSSP1BCInterruptMSSP1BC - MSSP1 Bus Collision
26IRQ 18 · 0x000038CompInterrupt_CompInterruptComp - Comparator
27IRQ 19 · 0x00003ACNInterrupt_CNInterruptCN - Change Notification Interrupt
28IRQ 20 · 0x00003CINT1Interrupt_INT1InterruptINT1 - External Interrupt 1
37IRQ 29 · 0x00004EINT2Interrupt_INT2InterruptINT2 - External Interrupt 2
73IRQ 65 · 0x000096U1ErrInterrupt_U1ErrInterruptU1E - UART1 Error
80IRQ 72 · 0x0000A4HLVDInterrupt_HLVDInterruptHLVD - Low Voltage Detect
85IRQ 77 · 0x0000AECTMUInterrupt_CTMUInterruptCTMU - Interrupt
88IRQ 80 · 0x0000B4ULPWUInterrupt_ULPWUInterruptULPWU - Ultra-Low Pwr Wake-up
104IRQ 96 · 0x0000D4CLC1Interrupt_CLC1InterruptCLC1 - Configurable Logic Cell Interrupt