Drink Machine

Discussion in 'The Projects Forum' started by prescott2006, Mar 23, 2009.

  1. prescott2006

    Thread Starter Active Member

    Nov 8, 2008
    72
    1
    I am on a project to build a drink machine.Below is the question and the state diagram.I would to do it with conventional method not Verilog or VHDL.I have some questions:
    -Is the state diagram correct?
    -How do I construct next state equation while there are so many input out there?
    -Can you guys give me some draft to proceed with this project?
    -And I want to ask is any component or way to control the clock?For example, when I insert 10 cent, the signal will stay high forever but won't fall down, so what i want is when i insert coin the clock will high then low,then when I enter second coin the signal become high again and add them up.

    If i am in the totally wrong direction,hope you all can correct me.Thanks.
     
  2. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    I worked on Vending Machine programming several years back. We did NOT use state machines -- we used 8085 assembler.

    As to "... I want to ask is any component or way to control the clock?For example, when I insert 10 cent, the signal will stay high forever but won't fall down, so what i want is when i insert coin the clock will high then low,then when I enter second coin the signal become high again and add them up," the coin acceptors we used reported the coin's value as pulses: a nickel ($0.05) would be 1 pulse, a dime ($0.10) two pulses, and a quarter ($0.25) five pulses.
    Look at the specs -- there should be a way to notify the coin acceptor that you have gotten the message, at which point the "coin line" should go back to low. Or the spec will tell you that the line will stay high for xxx milliseconds. If the line goes high, and stays high, look for another manufacturer, because you will have too much trouble with this one.

    Also, look at http://legacy.imatix.com/html/libero/index.htm to generate state machines.

    --Rich
     
Loading...