On Thu, 07 Dec 2006 12:36:06 -0800 Ned Konz <ned@bike-nomad.com> wrote: > Reza wrote: > > > 2- In some cases, specially defining a serial port > protocol, I need > > to use state machine, rather than using multi-task > kernels. but > > defining and implementation of a state machine is a > time consuming > > task. and when you want to change any logic you may > need to review > > all work. is there any tools which could be customized > to generate > > AVR assembly or C code in help of state machine design? > I have a hard time imagaining that some sofware framework could help very much to save time. You still have to define the states, what occurs in each, and what the events are that cause state transitions. I can't see how "tools" will help you with any of that. I say that from experience of having built some fairly complex state machines on both 8051's and AVRs. Also, the key, in my mind, to maintenence is "Comments". Comment, comment, comment. Put descriptive headers with written descriptions of your state machine in the source code. Describe what is supposed to happen in each state, what it represents, and the logic behind the state transition logic. The written description can take more lines than the executed code, but its worth it a year later. Jim --------------------------------------------------------------- The Think Different Store http://www.thinkdifferentstore.com/ For All Your Mac Gear ---------------------------------------------------------------
Message
Re: [AVR-Chat] What is your suggestion?
2006-12-10 by Jim Wagner
Attachments
- No local attachments were found for this message.