Beginning with XC16 v1.22, an interrupt service list for each device can be found in the folder <Compiler-DIR>/docs/vector_docs. A convenient index can be found in <Compiler-DIR>/docs/vector_index.html.
The 16-bit devices allow interrupts to be generated from many interrupt sources. Most Sources have their own dedicated interrupt vector.
Many 16-bit devices have two interrupt vector tables – a primary and an alternate table– each containing several interrrupt vector location.
The interrupt vector names for a particular device are under the device specific linker script file(.gld).
The Interrupt vector name in the gld file has double underscore ‘__’, but while declaring the Interrupt routine in the C source file, the Interrupt vector should only have a single underscore ‘_’.
You can refer the device specific linker file (.gld) for PIC24F family under the folder:
<Compiler-DIR>\support\PIC24F\gld
Legacy Syntax
Example 1:
UART1 receive interrupt service routine is called whenever a byte of data is received in UART receive buffer.
Device used: dsPIC33EP512GM710
Example 2:
UART1 transmit interrupt service routine is called whenever a data is sent from UART1 transmit buffer.
Device used: dsPIC33EP512GM710
CCI Syntax
CCI syntax may be enabled from Project Properties > XC16-gcc > Preprocessing and messages.
With CCI syntax enabled, this is how the interrupt are written:
Example 1 with CCI Syntax enabled
UART1 receive interrupt service routine is called whenever a byte of data is received in UART receive buffer.
Device used: dsPIC33EP512GM710
Example 2 with CCI Syntax enabled
UART1 transmit interrupt service routine is called whenever a data is sent from UART1 transmit buffer.
Device used: dsPIC33EP512GM710

