1

I am trying to simulate an interrupt with an Arduino Uno in Proteus. This is the simple test code that I'm using:

void introutine()
{
  digitalWrite(13,HIGH);
}

void setup()
{
  pinMode(13,OUTPUT);
  attachInterrupt(2,introutine,LOW);
}

void loop()
{
}

Here's the circuit in Proteus:

enter image description here

When I hit the button, the LED is supposed to turn on. Well, nothing happens. I have read something about Proteus being bad at simulating interrupts, but I'm not sure about it because Timer1 interrupts did work well. Basically, the problem lies within EXTERNAL interrupts only. I hope you people can help me.

Thank you.

  • NOTE: the node between R5 and the button says IO13 because I forgot to undo that. Suppose it says IO2, and still it will not work. – sebascarra Mar 27 '16 at 6:21
  • Why do you have mode LOW in attachInterrupt instead of RISING? Also, instead of putting some kind of correction about IO13 vs IO2 in a comment, please edit that info into the question. Also, the phrasing “Suppose it says IO2, and still it will not work” asks us to imagine it doesn't work when you correct the pin number. Rather than asking us to imagine that's the case, why not go ahead and test it and then edit the question to say what the effect of the change was? – James Waldby - jwpat7 Mar 28 '16 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy