ES210, Digital Design Lab Reporter Name: Date: Partner Names: Group No.: i Lab 12 Digital Lock Project A. Objectives Practice design of a device that operates based on a Finite State Machine (FSM) Learn how to implement a FSM using flip-flops and common logic gates. B. 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 get on train. It is an example of a FSM with its state diagram and its state transition table as shown below. See Wikipedia below and the textbookiii. Current State Input Next State Coin Unlocked Unlock turnstile so customer can push through Push Locked None Coin Unlocked None Push Locked When customer has pushed through, lock turnstile Locked Borrowed from Wikipedia “Finitestate machine”, https://en.wikipedia.org/wiki/Finitestate_machine Output Unlocked C. Problem Statement: In this experiment, it is desired 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, then entering in 10, ‘Enter’, 11, ‘Enter’, 01, ‘Enter’, should open 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. D. Hardware you may need to connect for the final circuit A Digital Multimeter A +5 V power supply A breadboard/protoboard and wires Any logic gate available in the lab D flip-flops using a JK flip-flop (7473A) and an Inverter (7404) Datasheets of ICs from dept. website or the Internet E. Required: 1. The state diagram. Please use a computer-generated diagram, so that it would be neat and formal as practiced in industry. Remember you will be engineers soon. Hand-generated diagrams are not accepted. You can use https://www.lucidchart.com/ 2. The state table, i.e., output and each next state versus inputs and current states. Please use a computer-generated table. Hand-generated tables are not accepted. Dr. Ali Kujoory 6/30/2016 1 3. K-maps of output and each next state as a function of inputs and current states. Please use computer-generated maps. Hand-generated maps are not accepted. 4. Equations. Please use computer-generated equations. Hand-generated equations are not accepted. 5. Logic circuit diagram. The design should contain the minimum amount of IC modules used. Please use a computer-generated diagram. Hand-generated diagrams are not accepted. F. Final Circuit (Each member should build the circuits, do the experiment and submit her/his complete report separately.) 1. 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 an LED - when the lock is open it should show green, if locked it should show red. 2. Use a switch or push-button to mimic “Enter” function after entering the two bits 3. Show the complete circuit to the instructor to check your correct operational digital lock circuit. G. Feedback/Comments (your comments will help improving this lab) Was the instruction clear enough? Any error? How difficult was it for you? Do you have any observations to make? H. Report 1. Report the answers in the tables above. You do not need to include the unnecessary text such as the objectives, instructions, and procedures in the report. 2. Each member should submit her/his complete report separately. i The author acknowledges Dr. Loren Betts and as some of the sections come from his work. https://en.wikipedia.org/wiki/Finite-state_machine iii “Logic Design” by Mano, Chapter 5. ii Dr. Ali Kujoory 6/30/2016 2