Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC32MX795F512L External Interrupt-1 (INT-1) Problem??

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
Hello!!! i am trying to use the PIC32MX795F512L External Interrupt, i am using XC32 compiler and MPLAB X IDE.
As most of you are aware of legacy libraries coming with compiler, so i dont want to use the old ones, i want to use the new ones.
but my code is now working with the new one, and working with the old one, here is my code for both cases.

OLD ONE
Code:
//ISR
void __ISR(_EXTERNAL_1_VECTOR,IPL6SOFT) External_Interrupt_1(void)
{
    mINT1ClearIntFlag();
}
 
 
//Main
    mINT1SetIntPriority(6);
    mINT1SetEdgeMode(0);
    mINT1IntEnable(1);

When using the New Library, it is as follow:-
NEW ONE
Code:
//ISR Code
void __ISR(_EXTERNAL_1_VECTOR,IPL6SOFT) External_Interrupt_1(void)
{
  INTClearFlag(INT_SOURCE_EX_INT(INT_INT1));
}
 
//In main
/*
     * Enable External Interrupt-1
     */
    /*Interrupt on Falling Edge*/
   ConfigINT1(FALLING_EDGE_INT);
    //
    /*Enable External Interrupt-1 Priority to Level-6*/
    INTSetVectorPriority(INT_VECTOR_EX_INT(INT_INT1),INT_PRIORITY_LEVEL_6);
    /*Enable External Interrupt-1 Sub-Priority to Level-3*/
    INTSetVectorSubPriority(INT_VECTOR_EX_INT(INT_INT1),INT_SUB_PRIORITY_LEVEL_3);
    /*Clear External Interrupt-1 Interrupt Flag*/
    INTClearFlag(INT_SOURCE_EX_INT(INT_INT1));
    /*Enable the External Interrupt-1*/
   INTEnable(INT_SOURCE_EX_INT(INT_INT1),INT_ENABLED);

The New one is not working, means on pressing a button i am not going in interrupt.
While the old one works.
I had enabled the Multivectored and Global Interrupt in my code.

Please reply as soon as possible.
 

The code you gived is not useful to debug.
If you give the Function content,maybe have solution.
 

They are the functions provided by the Microchip XC32 and MPLABC32 compiler, i cant give you the source code of these functions.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top