multiple interrupts in pic32

Discussion in 'Embedded Systems and Microcontrollers' started by ajayreddy28390, Jan 30, 2012.

  1. ajayreddy28390

    Thread Starter New Member

    Jan 30, 2012
    1
    0
    Code ( (Unknown Language)):
    1.  
    2. void __ISR( 0, ipl1) InterruptHandler( void)
    3. {
    4. dummy = PORTReadBits(IOPORT_D, BIT_6 );
    5.    
    6.     // Step #2 - then clear the interrupt flag
    7.     mCNClearIntFlag();
    8. PORTSetBits(IOPORT_D,BIT_0);
    9. delay();
    10.  
    11. } // interrupt handler
    12. void __ISR( 0, ipl1) InterruptHandler( void)
    13. {
    14. dummy = PORTReadBits(IOPORT_D, BIT_7 );
    15.    
    16.     // Step #2 - then clear the interrupt flag
    17.     mCNClearIntFlag();
    18. PORTSetBits(IOPORT_D,BIT_1);
    19. delay();
    20.  
    21. } // interrupt handler
    22. void __ISR( 0, ipl3) InterruptHandler( void)
    23. {
    24. dummy = PORTReadBits(IOPORT_D, BIT_13 );
    25.    
    26.     // Step #2 - then clear the interrupt flag
    27.     mCNClearIntFlag();
    28. PORTSetBits(IOPORT_D,BIT_3);
    29. delay();
    30.  
    31. } // interrupt handler
    32.  
    I WANT TO GIVE DIFFERENT FUNCTIONALITY FOR INTERRUPTS
    PLEASE HELP ME OUT
    THANK YOU
     
    Last edited by a moderator: Jan 31, 2012
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    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.
     
Loading...