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.

Problem with using interrupts in dsPIC30F3011

Status
Not open for further replies.

yokel

Junior Member level 3
Joined
Nov 13, 2008
Messages
30
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,529
Dear All,
I am a newbie. I am using dsPIC30F3011 interrupts. Problem is, say I have activated the ISR of int0 only, but that ISR of int0 always gets activated if I input (no matter 0 or 1) something in any other interrupts pins or some other pins of the MCU which has no relation with interrupt. Even the ISR is called if I touch those pins with any metal in stead of any 1/0 input.

This is the code I am using-


void InitINT(void)
{
INTCON2=0x0001; //the result is same whether I set 1 or 0 here

//External Interrupt 0
IEC0bits.INT0IE=1; //enable INT0 ISR
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
IPC0bits.INT0IP = 4; // interrupt priority

return;
}

void __attribute__((interrupt, no_auto_psv)) _INT0Interrupt(void)
{
SendData('e'); // Send this to PC
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
}


Please tell me all the possible reasons (in both firmware and hardware parts) behind it so that I can troubleshoot

with thanks,
 

interrupt dspic

How is the interrupt pin being driven?
Sounds like noise.
Do you have pull up or pull down resistor on the input pin?
 

    yokel

    Points: 2
    Helpful Answer Positive Rating
external interrupt dspic

Yes.
Here the circuitry I am using

11_1233921943.jpg


Please suggest me some possible reasons
 

dspic external interrupt c

What is the value of Resistor?
 

set up isr dspic30f

Hi Yokel.

There is a special in Dspic u need to configure the interrupt as falling edge or rising edge and keep the Pin as in TTL output . So that any changes from logic 0 to Logic 1 only the intterupt occcurs. Please give me the feedback for the same.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top