needroom
Newbie level 1
I am very very new for this digital field, no idea how to start the below assignment at all. Could someone help to give me some light as details as possible. Tks a lot.
A vending machine accepts only We Cash cashcards. The vending machine has 4 items with the following prices.
ITEM Price(in $)
NUMBER
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 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 $10 or to a value of $15, whichever is lower. The current BALANCE in the card is displayed in decimal, with the digit in 10’s place by 1 LED, and digit in 1’s place by 4 LEDs.
Condition 1: If the previous selection was ’11’, the price of item ‘10’ is discounted to $1 and price of item ‘11’ is discounted to $2.
Condition 2: Display the digit in 10’s place by an LED, and digit in 1’s place by a seven segment display.
I have figure out the normal input selection but not the discount part. Could any person give some light for above. Tks.
A vending machine accepts only We Cash cashcards. The vending machine has 4 items with the following prices.
ITEM Price(in $)
NUMBER
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 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 $10 or to a value of $15, whichever is lower. The current BALANCE in the card is displayed in decimal, with the digit in 10’s place by 1 LED, and digit in 1’s place by 4 LEDs.
Condition 1: If the previous selection was ’11’, the price of item ‘10’ is discounted to $1 and price of item ‘11’ is discounted to $2.
Condition 2: Display the digit in 10’s place by an LED, and digit in 1’s place by a seven segment display.
I have figure out the normal input selection but not the discount part. Could any person give some light for above. Tks.