contagiouseddie
Joined: 10 May 2004 Posts: 60 Helped: 3
|
05 Nov 2005 10:17 Re: function of a state machine? |
|
|
|
|
rosemary2005
There's no 1 exact choice that could answer your question. But, the nearest choice would the choice 1 & choice 2. I think you shouldn't include choice 4 and 5 as they are basically methods to execute a embedded system processes rather than working as a function of state machine. This means that usually the processes in an embedded system are either executed in priority-based, round-robin based, or some hybrid method. Hence, these are not the reasons for the creation of state machine.
State machine allows processes to be executed in a more organised matter. I develop embedded system and at the place where I work, there is this practice of creating state machines for almost every possible processes and even for small functions. State machine are usually implemented using switches (if you are using C as programming language). It is true as you have mentoned in one of your choices, state machine ensures exceptions are less likely to occur. In this case, whenever these exceptions do occurs, most probably a reset of state machine would occur.
If you want to get more ideas on this state machine. Read this book "Embedded Systems Building Blocks" by Jean J. Labrosse. It's available for download here.
Good luck.
|
|