CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC programming structure

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gg
Guest







PIC programming structure
PostPosted: Fri Sep 07, 2007 8:38 pm     Reply with quote

What are some different code structure that I can use?
Guest








Re: PIC programming structure
PostPosted: Fri Sep 07, 2007 8:42 pm     Reply with quote

gg wrote:
What are some different code structure that I can use?


How I do implement FSM with pic?
Guest








PostPosted: Tue Sep 11, 2007 12:38 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group