PDA

View Full Version : I need help in Logic Design!!!!!!!!!


SongCuong
10-01-2002, 09:54 AM
>Hello, i need help in designing a control unit for a candy machine.
>Thank you!!!
>
> Design a control unit for a candy machine; candy costs only 20 cents
>and machine accepts nickels and dime. Change should be returned if
>more than 20cents is deposited. No more than 25 cents can be
>deposited on a single purchase, therefore maximum change is nickel.
>
> For this design, eithter a Moore or Mealy model can be used and the
>circuit is either J/K or D flip flops .


Thanksss alot

Chris-T
10-01-2002, 09:36 PM
I cannot implement the actual ckt for you. However, I can give u
some guides to start. This is state-machine problem, and first is to
find out How Many States it has. No More than 25c ==> total
0, 5, 10, 15, 20, 25c or 6 states total (S0, S1, .... S5 respectively).
Next, What are the Inputs: Nickel and Dime (2 input, not include Clock).
Then, What are the Outpus: Release (candy) and Change (Nickel).
For 6 states total ==> you can either use 6FF's for each state or
minimize by using 3FF's & additional combinational logic gates to define.
From here, you can draw state-diagram, i.e.
From S0 (zero cent, intial state, reset-state, start-state), if input=Nickel
then S1, if input=Dime then go to state S2. Continue for all states.
For Outputs: Release = S5 + S4 (OR-gate), Change = S5.
Note that, From state S4 or S5 (after Release/Change) the next state
is to S0 (Reset ti Initial).
Hope you cary on - Enjoy. BTW, Is Fiber-Optic a Required course? or
just your Elective?

seanguyen
10-02-2002, 02:48 PM
Logic Design? You mean you have to build the actual circuit on the prototype board and actually send 5V Vcc in with a bundle of LEDs and switches? Or just a design that you only required the simulation?