Starting from:
$30

$24

Lab 9: Keyboard (Calculator) Solution

Objective




Implement keyboard function.



Prerequisite




Fundamentals of logic gates.



Logic modeling in Verilog HDL.



Keyboard control procedure



Experiments







Implement Key Board



1.1 Press 0/1/2/3/4/5/6/7/8/9 and show them in the seven-segment display. When a new number is pressed, the previous number is refreshed and over written.




1.2 Press a/s/m (addition/subtraction/multiplication) and show them in the seven-segment display as your own defined A/S/M pattern. When you press “Enter”, refresh (turn off) the seven-segment display.




Implement a single digit decimal adder using the key board as the input and display the results on the 14-segment display (The first two digit are the addend/augend, and the last two digits are the sum).



Implement a two-digit decimal adder/subtractor/multiplier using the right-hand-side keyboard (inside the red block). You don’t need to show all inputs and outputs at the same time in the 7-segment display. You just need to show inputs when they are pressed and show the results after “Enter” is pressed.












Implement the “Caps” control in the keyboard. When you press A-Z and a-z in the keyboard, the ASCII code of the pressed key (letter) is shown on 7-bit LEDs.
4.1 Press “Caps Lock” key to change the status of capital/lower case on the keyboard. Use a led to indicate the status of capital/lowercase in the keyboard and show the ASSCII code of the pressed key one 7-bit LEDS.




4.2 Implement the combinational keys. When you press “Shift” and the letter keys at the




same time. The 7-bit LEDs will show the ASCII code of the uppercase/lowercase of the pressed letter when the “Caps Lock” is at the lowercase/uppercase status.

































































































More products