Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Re: [AVR-Chat] Interrupt routine

2006-01-02 by Zack Widup

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.