ES210L, Digital Circuits and Logic Design Lab
Reporter Name: / Date:Partner Names: / Group No.:
Lab 11: Digital Lock Project [i]200%
- Objectives
- Design practice on a device that operates based upon a Finite State Machine (FSM)
- Learn how to implement a FSM using flip-flops and common logic gates.
- Introduction
“A finite-state machine (FSM), or simply a state machine, is a mathematical model of computation used to design both computer programs and sequential logic circuits. It is conceived as an abstract machine that can be in one of a finite number of states.”[ii] It is defined by a number of states and starting from the current state, it transits to the next state by a trigger or a condition.
Fig. 1 below shows a picture of turnstile that is used at the coin-operated entrance to the platform to access a train. It is an example of a FSM with its state diagram and itsstate transition table as shown below. See Wikipedia below and the textbook[iii].Turnstile / State Diagram / State Transition Table
/
Borrowed from Wikipedia “Finite-state machine”, / Current State / Input / Next State / Output
Locked / Coin / Unlocked / Unlock turnstile so customer can push through
Push / Locked / None
Unlocked / Coin / Unlocked / None
Push / Locked / When customer has pushed through, lock turnstile
- Problem Statement:
In this project, you are to design and implement a digital lock with the following specifications:
•The lock must remain locked until the correct three 2-bit sequences are entered in the correct order.
•The unlock sequence should be programmed to be 10-11-01. Thus, entering 10, ‘Enter’, 11, ‘Enter’, 01, ‘Enter’, willopen the lock.
•If a 2-bit number is entered that is not in the correct sequence then the lock should reset and remain locked. Entering 00 should also reset the lock and lock it.
•In unlocked state any inputs other than 00 will keep the device unlocked.
•Use a Mealy or MooreFinite State Machine to synthesize the digital lock. You can follow “Design Procedure” Section 5.8 of Mano textbook step-by-step for this project.
- Required:
- For your report, you can save a copy of this instruction sheet with file name “YourLastName_Project_Lab11.docx” & fill in the answers to the questions for submission.
- Please follow the Design Procedure in Sections 5.7 & 5.8 in your textbook by Mano.
- Hand-generated diagrams are not accepted.
- I urge you to take this project seriously for your learning and you may have similar design problem in the Final exam. I trust you would not to copy!
- A +5 V power supply
- A breadboard/protoboard and wires
- Components – you need to identifyand provide the quantity based on your design
- Datasheets of ICs from dept. website or Internet
- 12% (4% for Neatness) The state diagram (as inFig 5.27 in Mano textbook, Ed. 5).You need to assign states, reduce number of states, and assign binary values to the states.
- 16% (4%Neatness) The state table (as in Table 5.11)to representthe output and each next state versus the inputs and current states.Use A and B for the states and Flip-flops, x and y for the inputs, and z for the output. Also Choose the type of flip-flops (D, T, JK)) to be used.
- 4%What FF type would you use? Explainyour selection.
- 12% (4% Neatness) K-maps(as in Fig 5.28)of output and each next state as a function of current statesand inputsand minimize. Please try to use computer-generated maps.
- 12% (4% Minimization)Derive theequationsof the output of the FFs and the circuit(as on p239).
- 14% (4% Neatness) Logic circuit diagram(as in Fig 5.29).The design should contain the minimum number of IC modules used. Please use a computer-generated diagram.
- 4% Explain whether your solution is a Mealy or Moore Machine (as in Fig 5.21 and 5.29).
- 20% (Only 8% if it did not work) Final Circuit
- Connect your circuit diagram for the digital lock on the protoboard. Use two switches to input the binary digits and two LEDs to display the 2-bit numbers. Connect the lock output to another LED -when the lock is open it should showGREEN, if locked it should showRED.
- Use a switch or push-button to mimic the “Enter” function upon entering the two bits.
- Show your complete operational circuit to the instructor for sign off.
- Feedback/Comments (your comments will help improving this lab)
Was the instruction clear enough? Any error? / 0.5%
How difficult was it for you? / 0.5%
Do you have any observations to make? / 1%
- Report
- Report the answers in the tables above.
Dr. Ali Kujoory11/14/20181
[i]The author acknowledges Dr. Loren Betts and as some of the sections come from his work.
[ii]
[iii]“Logic Design” by Mano, Chapter 5.