multiple interrupts in pic32

Thread Starter

ajayreddy28390

Joined Jan 30, 2012
1
Rich (BB code):
void __ISR( 0, ipl1) InterruptHandler( void)
{
dummy = PORTReadBits(IOPORT_D, BIT_6 );
    
    // Step #2 - then clear the interrupt flag
    mCNClearIntFlag();
PORTSetBits(IOPORT_D,BIT_0);
delay();

} // interrupt handler
void __ISR( 0, ipl1) InterruptHandler( void)
{
dummy = PORTReadBits(IOPORT_D, BIT_7 );
    
    // Step #2 - then clear the interrupt flag
    mCNClearIntFlag();
PORTSetBits(IOPORT_D,BIT_1);
delay();

} // interrupt handler
void __ISR( 0, ipl3) InterruptHandler( void)
{
dummy = PORTReadBits(IOPORT_D, BIT_13 );
    
    // Step #2 - then clear the interrupt flag
    mCNClearIntFlag();
PORTSetBits(IOPORT_D,BIT_3);
delay();

} // interrupt handler
I WANT TO GIVE DIFFERENT FUNCTIONALITY FOR INTERRUPTS
PLEASE HELP ME OUT
THANK YOU
 
Last edited by a moderator:

ErnieM

Joined Apr 24, 2011
8,377
First off, two words: CODE TAGS! There's a sticky up there that explains em.

What compiler are you using? If it is the Microchip C32 then inside MPLAB on the help menu you should find a link to the C32 Compiler Guide, which has a whole chapter on these.
 
Top