Now that I think of it, you'd run through variable initialization as well right after that, so the memory locations should be reset to their initial values needed. At least, that's what I do in ASM. I would assume a C compiler would do the same thing, but I've never paid attention. -Micah On Monday 02 January 2006 3:36 pm, Zack Widup wrote: > 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 > > SPONSORED LINKS > Atmel avr Microcontrollers Intel microprocessors > Pic microcontrollers > > > YAHOO! GROUPS LINKS > > > Visit your group "AVR-Chat" on the web. > > To unsubscribe from this group, send an email to: > AVR-Chat-unsubscribe@yahoogroups.com > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Message
Re: [AVR-Chat] Interrupt routine
2006-01-02 by Micah Stevens
Attachments
- No local attachments were found for this message.