Software reset.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Software reset.

Post by medelec35 »

How easy is it to include a function block to do a software reset.
I.e a command to go to the beginning of main.
I need to do this from within a macro, but need to clear stack so a call macro would be 1st in the stack.
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Software reset.

Post by Steve »

Unfortunately, software reset on a PICmicro 16F is not simple. At the basic level, forcing the execution of the ASM "goto 0" code would be a start, but you might also need to set some registers to their default startup values (see the device datasheet for this).

Note that this suggestion is for code only. I'm not sure it is possible in simulation.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Software reset.

Post by medelec35 »

Steve,
Your soultion was perfect!
Working as intentended.
Thanks...
Martin

Post Reply