Docsity

Sequential Circuit Design - Digital Combination Lock - Experiment | ECE 265, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
©2006 University of Illinois at Chicago ECE 265 V. Goncharoff
University of Illinois at Chicago
Department of Electrical and Computer Engineering
ECE 265 - Introduction to Logic Design Spring 2006 Semester
Experiment # 11
Sequential Circuit Design -- Digital Combination Lock
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 X
4a 4b AB = X X
3a 3b AB = X X
2a 2b AB = X X
1a 1b
else else else
else
a
LED1
b
LED2
c
LED3
d
LED4
e
LED5
f
LED2
g
LED3
h
LED4
Lock successfully opened
unsuccessful attempt
unsuccessful attempt
power-up
pf3
pf4
pf5

Partial preview of the text

Download Sequential Circuit Design - Digital Combination Lock - Experiment | ECE 265 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

University of Illinois at Chicago

Department of Electrical and Computer Engineering

ECE 265 - Introduction to Logic Design Spring 2006 Semester

Experiment # 11

Sequential Circuit Design -- Digital Combination Lock

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:

  1. What are the last four digits of your student UIN?

(base 10)

  1. Based on this, what is your digital lock combination?

(base 2)

  1. Find simplified expressions for flip-flop excitation signals J 1 , K 1 , J 2 , K 2 , J 3 , K 3 :

J 1 =

K 1 =

J 2 =

K 2 =

J 3 =

K 3 =

  1. Because of the complexity of this circuit, it is recommended that you build and test it in stages. First, hook up three additional switches to simulate flip-flop outputs {Q 1 ,Q 2 ,Q 3 } in order to build and troubleshoot the circuitry that produces excitation signals J (^) n ,Kn. Next, build and test the 555 Timer one-shot circuit. At this point replace the switches simulating {Q 1 ,Q 2 ,Q 3 } with the actual JK flip-flop outputs, and drive the flip-flops with the clock and excitation signals. Instead of tying the JK flip-flop "CLEAR" pins directly to Vcc, use the circuit below (this will momentarily clear the flip- flops upon first hooking up the power supply, for the purpose of making sure that the circuit begins in state "a"):

Vcc

1 K Ω

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?