On 1/4/07, Thomas Keller <tjkeller1@alltel.net> wrote:
>
>
> OK. I am now running into problems with interrupts in emulation.
> Can AVR Studio emulate interrupt driven programs (e.g., with timer
> interrupts)? Either ti cannot, or I am, doing something wrongelse wrong
> in my interrupt setup.
I'm voting for "B". :)
I did remember to set the interrupt enable masks, bot the timer
> specific ones, and the global interrupt enable.
You need GIE, or no ints will happen (Global interrupt enable... duh..)
Then you need the specific mask bits for the ints you want.
Then you need a populated jump table.
Then you need proper handlers.
In my belts-and-suspenders world, I start with a fully populated vector
table, and each ISR has code that disables that particular int. Then on
the ones that I'm going to actually use, I write real handlers. This keeps
any accidentally enabled ISR from chewing up the system.
At other times, I've sent all "unused" ints to "halt and catch fire" code,
so that they couldn't escape detection. Sometimes it's better to crash
early and hard.
[Non-text portions of this message have been removed]