Controllers translate requirements into states, timers and transitions. A traffic-light example uses timed color states; a vending-machine example tracks inserted value and a vend decision. These are teaching models: real systems require richer safety, fault handling and interface rules.
Worked example
For a simplified machine accepting only a five-unit coin and selling an item for ten units, use states CREDIT0 and CREDIT5. A coin in CREDIT0 moves to CREDIT5. A coin in CREDIT5 issues a vend pulse and returns to CREDIT0. No coin holds the state.
What to watch for
Define what happens with cancellation, multiple coins, stock shortage and simultaneous events before building a real machine. Timed controllers also need a clear timer-reset and expiry convention.
Try it yourself
In the simplified vending machine, how many accepted coins cause one vend?
Answer: Two five-unit coins. The first stores CREDIT5; the second completes ten units and triggers vending.
How to study this topic
Begin with named states and a complete transition table. Then choose encodings and derive the logic. Trace inputs over several cycles, checking outputs as well as next states, including reset and unexpected encodings.
Explore related programmes
These recorded programmes are upcoming. This article is general educational content, not a syllabus or course sample.
Digital Electronics