Lab 5: Keyboard Entry

In this Lab5 we will attach a Hexadecimal Keyboard port to our CAPC processor.

(0) Load LogicWorks4.
(1a) Select a general 16 bit register created in Lab2 and name it as KB register.
(1b) Select Hexadecimal Keyboard (without S(trobe?)) from LogicWorks 4 and make 4 copies on the design sheet. The hexadecimal keyboard has four output lines which represents a hex key entry (by selecting and clicking a number from 0 to f on the keypad).
(1c) Attach 16 output lines of 4 keypads to input lines of the KB register in (1a).
(1d) Test Hex Keyboard and KB by attaching several binary probes (or 4 copies of Hex Display).

(2) Attach KB register to the Bus in Lab1-4:
(2a) "Duplicate" a copy of 16 bit Breakout to the Bus.
(2b) Connect 16 output lines of KB to the new Breakout.

(3) Hardwiring of the machine instruction KTG.
(3a) Select a 3 input AND gate.
(3b) Connect KTG line (that is, output line 1110 of 4x16 Decoder attached to IR[12..15]) to the first input line of the AND gate in (3a).
(3c) Connect T7 line from the Clock and Fetch line from the State Flip-Flop to the second and the third input line (if T7 and Fetch are separate) of AND gate in (3a).
(3d) Connect the output line of AND gate in (3a) to Send_KB line (3 state control line of KTG register in (1a).
(3e) Connect the output line of AND gate in (3a) to Load_G line (Clock line of G register in Lab1-4.

(4) Testing of the machine instruction KTG.
(4a) Load the instruction "1110 0000 0000 0000" (KTG)in the memory at the location f80(Hex).
(4b) Load the instruction "1111 0000 0000 0000" (HLT)in the memory at the location f81(Hex).
(4c) Pre-load PC with "1111 1000 0000" (f80(Hex)).
(4d) "Key-in" "2AE8" (in Hex) by using the Hex Keyboard in (1).
(4e) Confirm that KB contains 2AE8.
(4f) Now Run two Fetch cycles.
(4g) Observe that G register contains the number 2AE8 which was entered via Keyboard .


Submit entire "Lab5.cct" file via eMail to Dr. Hasegawa by 10.00pm on Saturday, Mar 9th.