Question: Question 2 [ 6 0 Marks ] A mask vending machine follows a set of instructional flow in order to dispense a mask to a
Question Marks
A mask vending machine follows a set of instructional flow in order to dispense a mask to a user. It allows a user to either use the barcode on an identity card or manual entry of identity card number to dispense a mask.
You are required to apply what you have learnt in EC module to design the digital state machine for the mask vending machine.
You may assume the following:
i A barcode sensor is available to process the barcode of an identity card. The barcode sensor outputs a HIGH when the barcode is valid for a mask to be dispensed and outputs a LOW when the barcode is invalid.
ii A keyboard entry sensor is available to process the keyboard entry of the identity card number. The keyboard entry sensor outputs a HIGH when the entered number is valid for a mask to be dispensed and outputs a LOW when the number is invalid.
You are required to:
a Design a state diagram to illustrate the operation of the vending machine. In your state diagram, indicate clearly the relationship between the inputs received by the machine, the outputs from the machine and the state transitions. Explain your decisions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
