Program restart

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
epes
Posts: 54
Joined: 23 Apr 2010 13:03
Location: Prague, Czech rep.

Program restart

#1 Post by epes » 13 Jun 2019 17:46

At TINY2313, program in MikroC.
I need to make a program restart not chip restart. From interupt routine i need program to run from begining again.
Will someone help?.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Program restart

#2 Post by filip » 21 Jun 2019 09:43

Hi,

You can do something like this :

Code: Select all

  asm RJMP _main
It will jump to the beginning of the main routine, effectively restarting the code.

Regards,
Filip.

epes
Posts: 54
Joined: 23 Apr 2010 13:03
Location: Prague, Czech rep.

Re: Program restart

#3 Post by epes » 27 Jun 2019 14:20

Dear Filip,
thanks for your advice. But command "asm RJMP _main" is imposible to use in interupt routine - error: Undeclaare identifier "_main".
Don't you know any trick else?

Post Reply

Return to “mikroC PRO for AVR General”