Your initialization of the chip should include resetting the stack pointer. So if at the end of your interrupt routine you go to the very start of the program instead of using "retfie", you're starting completeny new and it shouldn't matter. Zack On Mon, 2 Jan 2006, Moataz Hussein wrote: > > > Thanks all for your advice, I was meaning start of program i.e. full reset. > > In a book I have it is mentioned > "When an interrupt occurs the value of the program counter is stored in the stack so that the program returns to where it was when the handling interrupt is over." > > So is it correct that going to the start (rjmp start) at the end of the interrupt routine instead of the RETI instruction will not help? > > Moataz
Message
Re: Re: [AVR-Chat] Interrupt routine
2006-01-02 by Zack Widup
Attachments
- No local attachments were found for this message.