b) A coffee machine has 4 outputs to provide the following 4 selections of hot drinks: Coffee only: 5$ Coffee with Sugar
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
b) A coffee machine has 4 outputs to provide the following 4 selections of hot drinks: Coffee only: 5$ Coffee with Sugar
b) A coffee machine has 4 outputs to provide the following 4 selections of hot drinks: Coffee only: 5$ Coffee with Sugar: 5$ Coffee with Milk: 6$ Coffee with Milk and Sugar: 6$ The machine only accepts Octopus card payments. There is one push button to switch the price from 5$ (default price) to 6$. The user needs to first select the price, then tap the card before selecting the drink. The machine has 3 push button inputs for selecting the drink: one button for selecting Coffee, one button for Milk, and one button for Sugar. The procedures for selecting a drink are as follows: i. To select Coffee only, the customer can just press the Coffee Button directly. ii. To select Coffee with sugar, the customer needs to press the Sugar Button first and then the Coffee Button. iii. To select Coffee with milk, the customer needs to press the Milk Button first and then the Coffee Button. iv. To select Coffee with milk and sugar, the customer needs to press the Milk Button and Sugar Button sequentially in any order and then the Coffee Button. When the customer has taken the drink out of the machine, a completion signal will be issued for resetting the dispensing process. Use a Mealy model to design the aforementioned dispensing machine. Hint: Below is the value for inputs and outputs, and part of a design is given. bit LSB bit LSB Input Price selection Tap octopus card Coffee Sugar Milk value 0 or 1 0 or 1 0 or 1 0 or 1 0 or 1 Outputs Coffee only Coffee + sugar Coffee + milk Coffee + milk + sugar value 0 or 1 0 or 1 0 or 1 0 or 1 MSB MSB [10 marks] ????? ???? Price changed 00010 0000 Payment (w/ milk)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!