What are some different code structure that I can use?
Guest
Re: PIC programming structure
Posted: Fri Sep 07, 2007 8:42 pm
gg wrote:
What are some different code structure that I can use?
How I do implement FSM with pic?
Guest
Posted: Tue Sep 11, 2007 12:38 am
See
h t t p : // ai-depot.com/FiniteStateMachines/FSM-Framework.html
(remove the spaces, as guest I cannot post urls)
One possibility might be the state increments under interrupt, another might be the state just alters in normal program execution.
Basic answer however:
Define yourself some states, and depending on some event or result alter it. Then in a switch/case or if/else statement start/call another routine to handle that state.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum