Alternative to state machines question

Thread Starter

Malsch

Joined Mar 19, 2011
23
I have designed a simple vending machine using Moore state machines which outputs sweets or the money if you insert more than the cost of the sweets.

Now i have to criticize the use of a state machine when used in such a vending machine and have to suggest and alternative implementation which would give more versatility to the system.

I really don't know how to continue from here. Any help would be greatly appreciated

10q
 

jegues

Joined Sep 13, 2010
733
I have designed a simple vending machine using Moore state machines which outputs sweets or the money if you insert more than the cost of the sweets.

Now i have to criticize the use of a state machine when used in such a vending machine and have to suggest and alternative implementation which would give more versatility to the system.

I really don't know how to continue from here. Any help would be greatly appreciated

10q
Why not argue that the system could be implemented using a Mealy type state machine?

This should reduce the overall number of states in the system thus giving the designer more room for implementing more versatile functionality.
 

Georacer

Joined Nov 25, 2009
5,182
...or change the concept altogether and use a microcontroller, making your life much easier. I don't see any limits in the original question...
 

atferrari

Joined Jan 6, 2004
4,764
Now i have to criticize the use of a state machine when used in such a vending machine and have to suggest and alternative implementation which would give more versatility to the system.
May I ask if there was something wrong with the implementation itself? If not, (machine working OK) why do you have to revise?

What is versatility is that context? A revised state machine couldn't cope with the new target?
 

Georacer

Joined Nov 25, 2009
5,182
An example of the FSM's reduced versatility I can quickly think of is the case where you want to change the price of the delivered goods. That can be a problem with an FSM. With an uC, not quite.
 

Thread Starter

Malsch

Joined Mar 19, 2011
23
Thank you for your help. i have managed to finish the question. The alternation i mentioned was the use of a microcontroller. LED displays and keypads can be easily connected to make the user's life easier. and a variaty of sweets can be bought hehe
 
Top