English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (328/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
EXAMPLE 12-2: CHANGE NOTICE ISR EXAMPLE
/*
The following code example demonstrates a simple interrupt service
routine for CN interrupts. The user’s code at this vector can perform any
application-specific operations. The user’s code must read the CN
corresponding PORT registers to clear the mismatch conditions before
clearing the CN interrupt status flag.
Finally, the CN interrupt status flag must be cleared before exiting.
*/
void __ISR(_CHANGE_NOTICE_VECTOR, ipl5) CN_Interrupt_ISR(void)
{
unsigned int value;
value = PORTB
value = PORTC
// Read PORTB to clear CN4 mismatch condition
// Read PORTC to clear CN1,CN0 mismatch condition
... perform application specific operations in response to the interrupt
IFS1CLR = 0x0001;
}
// Be sure to clear the CN interrupt status
// flag before exiting the service routine.
Note: The CN ISR code example shows MPLAB® C32 C compiler-specific syntax. Refer to your compiler manual
regarding support for ISRs.
DS61143E - page 326
Preliminary
© 2008 Microchip Technology Inc.