The Student Room Group

any person good at Digital Design

Hi any person good at digital Design can help throw some light please. I stuck at the discount part. Tks.
A vending machine accepts only We Cash cashcards. The vending machine has 4 items with the following prices.

ITEM NUMBER Price
(in S$)
00 1
01 2
10 3
11 4

User selects an item by setting the ITEM_NUMBER on a 2-bit DIP switch and pressing the SELECT push button. The value of the item is deducted from the card and the item is dispensed, shown using a DISPENSING LED for 1 second. If the previous selection was ’11’, the price of item ‘10’ is discounted to S$1 and price of item ‘11’ is discounted to S$2. If the card has insufficient value for the selection, another LED, INSUFFICIENT_VALUE lights up for a second, and the card value remains unchanged. There is a TOP_UP push button on top up the card by S$10 or to a value of S$15, whichever is lower. The current BALANCE in the card is displayed in decimal, Display the digit in 10’s place by an LED, and digit in 1’s place by a seven segment display.
Reply 1
any help please
Reply 2
no?

Latest

Trending

Trending