



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Introduction
In this experiment you will design and build a clocked sequential circuit that performs the function of a digital combination lock. Because the 8-bit code to open the lock is derived from the last 4 digits of your university identification number (UIN), each student will design and demonstrate one of the 256 different versions of this lock. The state diagram of the digital combination lock is shown below:
AB = X X4a 4b AB = X X3a 3b AB = X X2a 2b AB = X X1a 1b
else else else
else
a LED
b LED
c LED
d LED
e LED
f LED
g LED
h LED
Lock successfully opened
unsuccessful attempt
unsuccessful attempt
power-up
Input binary variables A and B are generated using switches as usual; these switches are flipped to establish the correct values of A and B in preparation for the next state transition.
The circuit will use the JK flip-flops that are provided in your lab kit. All flip-flop clock inputs are to be taken from the 555 Timer operating as a one-shot that was used in Experiment #9. The clock circuit is a debounced switch that you control − creating a pulse on the master clock line only after you've had time to change code bits A,B in preparation for the next state transition.
The combination to open your lock will be a sequence of four 2-bit binary codewords: AB = X4aX4b ; X3aX3b ; X2aX2b ; X1a X1b. Let (Y 4 Y 3 Y 2 Y 1 ) 10 be the last four digits of your student UIN. Each codeword XNaX (^) Nb is the least-significant two bits of decimal digit YN, when it is represented in binary. Example: when the last four UIN digits are 1583, the binary code to open the lock is: 01; 01; 00; 11.
Five LEDs are to provide an indication that the lock is in the following states: LED1: state a; LED2: states b,f ; LED3: states c,g; LED4: states d,h; LED5: state e.
Include this in your Lab Report:
(base 10)
(base 2)
Vcc
to flip-flop "CLEAR" input
1 uF
Finally, when this sub-circuit has been fully tested using both correct and incorrect lock codes, add the circuitry necessary to obtain the five LED output signals from {Q 1 ,Q 2 ,Q 3 }.
Neatly draw a complete schematic diagram of the resulting circuit and include it in your lab report. Demonstrate the operation of the lock circuit to your T.A. You will be asked to demonstrate the effect of both correct and incorrect lock codes.
This experiment may require two weeks to complete. Make sure that your batteries are fully charged. Be deliberate in constructing and then testing your circuit in stages, as described previously. Some university identification numbers will lead to more complicated designs, but that's life!
Also to be included in the Lab report:
6a. Show the state transition diagram for your circuit, labeled with your own combination code bits.
6b. Show the state transition table, and all K-maps used to find the J,K input signals to the three flip-flops.
6c. Neatly draw a schematic diagram of the entire circuit that you have built and will demonstrate to the T.A. (showing every component: 555 timer circuit, flip-flops, MUXs, logic gates, switches, LEDs, and resistors).
6d. In this application why is it necessary to use the 555 Timer one-shot circuit instead of directly creating a clock signal using a switch?
6e. Explain the advantage of having all incorrect codes result in passing through state "h" of the state diagram, rather than directly leading back to state "a".
6f. In Part 3 you were asked to use specific state variable assignments for each of the eight states of the digital combination lock. Looking back, why do you think this particular state assignment was a good idea? (For example, why is it useful to have state b represented by Q 1 Q 2 Q 3 = 001 and state f represented by Q 1 Q 2 Q 3 = 101, etc.?)
6g. Your digital combination lock has 4 codewords of 2 bits each. A similar digital combination lock is being designed using N codewords of 8 bits each. What is the minimum value of N needed to ensure that a code of N randomly-selected codewords is likely to succeed at most once in 1 trillion attempts, on the average?