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
James Washer wrote:
> when you say "start from the beginning", are you saying you want a FULL RESET?
>
> If so, you'd need to build and trigger an external reset hardware, or enable the watchdog timer and then just spin until a watchdog reset occurs.
>
> - jim
>
> On Mon, 2 Jan 2006 04:19:44 -0800 (PST)
> Moataz Hussein wrote:
>
>
>>I am working on a test project on AVR 1200, I have a question regarding the external interrupt. I understand that after the interrupt occurs the interrupt handling routine is called, after it is finished the program goes back to where it has stopped.
>>
>> I have a question:
>>
>> Is it possible and how to; After the interrupt handling routine is completed. Can the program starts from the begining not where it stopped when the interrupt routine was called.
>>
>> Thank for help.
>>
All you need to do is to jump to the beginning of your program at the
end of the interrupt service routine instead of using the usual RETI
(return from interrupt) instruction. Of course, this depends on how you
initialize things too -- if you start out your program from reset and do
not assume anything is initialized and do the full initialization of
everything, then you should be OK. Just beware of the state of the
interrupt enable. All this is predicated on using assembly language and
not C.
Don
--
Confidence is the feeling you have before you really understand the problem.
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.