simulating external interrupts in atmel studio 7

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I've written a program for an attiny48 which uses external interrupts. I want to simulate the program within the simulator in atmel studio 7, but I can't seem to execute external interrupt. I am stepping through the program and I've been manually toggling the INT0 pin and also the INTF0 pin in the EIFR register, but nothing happens in response to either. I know that these are both working because I have programmed the chip and the interrupt works fine "in real life". What is the correct way of doing this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

As you say just "blobbing" the relevant bit in the PINx register should do it. I assume your code must be OK if it works in real AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a flag to cause the simulator to NOT follow interrupts when single stepping. You need to make sure this is off. You can find this in the Tools menu, Options item, then Tools in the Options list. The item is specifically named "Mask interrupts while stepping". It needs to be false. Been there, got bitten.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

YES! thankyou, Jim. Problem solved