SW500009 Microchip Technology, SW500009 Datasheet - Page 77

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
As there is a maximum of one interrupt vector in the midrange PIC series, only one interrupt
function may be defined. The interrupt vector will automatically be set to point to this function.
3.10.1.2 Highend Interrupt Functions
As there is more than one vector location usable with highend processors, an indicator is required
with the function definition to specify the interrupt vector to which the function should associated.
This takes the form of a @ symbol followed by the vector address at the end of the function prototype.
3.10.1.3 Context Saving on Interrupts
The PIC processor only saves the PC on its stack whenever an interrupt occurs. Other registers and
objects must be saved in software. The PICC compiler determines which registers and objects are
used by an interrupt function and saves these appropriately.
code in the same module, then any registers used by these functions will be saved as well. If the
called functions have not been seen by the compiler, a worst case scenario is assumed and all registers
and objects will be saved.
register usage. Thus, if you include in-line assembly code into an interrupt function, you may have
to add extra assembly code to save and restore any registers or locations used.
3.10.1.4 MidRange Context Saving
The code associated with interrupt functions that do not require registers or objects is placed directly
at the interrupt vector in a psect called intcode.
An example of an interrupt function for a high-end processor is shown here.
If the interrupt routine calls other functions and these functions are defined before the interrupt
PICC does not scan assembly code which is placed in-line within the interrupt function for
}
int tick_count;
void interrupt tc_int(void) @ 0x10
{
}
}
if (TMR0IE && T0IF) {
}
++tick_count;
T0IF = 0;
++tick_count;
Interrupt Handling in C
63

Related parts for SW500009