Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Similar documents
Encoders and Decoders: Details and Design Issues

CSE 352 Laboratory Assignment 3

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

EXPERIMENT 8 Medium Scale Integration (MSI) Logic Circuits

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

1. Convert the decimal number to binary, octal, and hexadecimal.

EECS 270 Midterm 1 Exam Closed book portion Winter 2017

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Combinational Logic Design

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

CprE 281: Digital Logic

Lab 17: Building a 4-Digit 7-Segment LED Decoder

INTRODUCTION (EE2499_Introduction.doc revised 1/1/18)

LAB 3 Verilog for Combinatorial Circuits

CprE 281: Digital Logic

COMP sequential logic 1 Jan. 25, 2016

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Experiment # 4 Counters and Logic Analyzer

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

ENGG2410: Digital Design Lab 5: Modular Designs and Hierarchy Using VHDL

ECE 2274 Pre-Lab for Experiment Timer Chip

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

CHAPTER 4 RESULTS & DISCUSSION

LAB 3 Verilog for Combinational Circuits

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

CprE 281: Digital Logic

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Computer Systems Architecture

Experiment (6) 2- to 4 Decoder. Figure 8.1 Block Diagram of 2-to-4 Decoder 0 X X

Lab #6: Combinational Circuits Design

1. Synopsis: 2. Description of the Circuit:

MODULE 3. Combinational & Sequential logic

EE 200 Problem Set 3 Cover Sheet Fall 2015

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

4.1* Combinational logic circuits implement logic functions using a combination of logic gates. Recall

Chapter 5 Sequential Circuits

Chapter 3. Boolean Algebra and Digital Logic

Final Examination (Open Katz, Calculators OK, 3 hours)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

CHAPTER 4: Logic Circuits

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

CHAPTER 4: Logic Circuits

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

CprE 281: Digital Logic

Midterm Exam 15 points total. March 28, 2011

Lab #11: Register Files

Lab #11: Register Files

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

STATIC RANDOM-ACCESS MEMORY

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Combinational vs Sequential

A Combined Combinational-Sequential System

1. True/False Questions (10 x 1p each = 10p) (a) I forgot to write down my name and student ID number.

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

ELEC 204 Digital System Design LABORATORY MANUAL

Chapter Contents. Appendix A: Digital Logic. Some Definitions

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Laboratory Exercise 7

Logic Design II (17.342) Spring Lecture Outline

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

Final Project [Tic-Tac-Toe]

Digital Networks and Systems Laboratory 2 Basic Digital Building Blocks Time 4 hours

Chapter. Synchronous Sequential Circuits

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

A Review of logic design

Why do we need to debounce the clock input on counter or state machine design? What happens if we don t?

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output

Computer Organization & Architecture Lecture #5

Logic Design II (17.342) Spring Lecture Outline

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Assignment 2b. ASSIGNMENT 2b. due at the start of class, Wednesday Sept 25.

Lab experience 1: Introduction to LabView

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

REPEAT EXAMINATIONS 2002

CPS311 Lecture: Sequential Circuits

(Refer Slide Time: 1:45)

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 2200

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

Principles of Computer Architecture. Appendix A: Digital Logic

North Shore Community College

CprE 281: Digital Logic

COMP12111: Fundamentals of Computer Engineering

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Transcription:

Learning Objectives ECE 206, : Lab 1 Digital Logic This lab will give you practice in building and analyzing digital logic circuits. You will use a logic simulator to implement circuits and see how they behave. The circuits include both basic gates (AND, OR, NOT) and higher-level functional blocks (decoder, multiplexer, adder). The Logic Simulator A logic simulator allows you to build a virtual logic circuit on a computer, so you can see how it works before building an actual hardware circuit. The simulator considers only the logical behavior of a circuit. It ignores physical characteristics, such as the time it takes a signal to get from one end of a wire to the other. Therefore, a logic simulator is a good tool to know if your circuit is correct, but it won t tell you how fast your circuit might be. For this lab, we will use a public-domain logic simulator called MultiMedia Logic (MML). It is installed on the lab computers, but you can also download it from the lab web page if you want to play at home. It runs on Windows 95/98/2K/NT machines. Before coming into the lab, read the short introduction to MML posted on the lab web site. You ll need this to answer the questions in Prelab Exercise 1. This material is extracted from MML s on-line help files, so you don t need to print this out to bring to lab unless you want to. For your circuits, you will use the following MML components: Toggle switch allows you to change inputs to 1 or 0. LED simple output device that turns on when its input is 1. Wiring Tool used to connect components to each other. AND, OR, NOT basic logic gates. AND and OR can take up to 4 inputs, and you can invert the output to create NAND and NOR gates. (Double-click or right-click on the component to set its options.) Text Tool used to add text labels to your circuit diagram. You might also want to use the Node Tool, which helps you control how wires are drawn. The Wiring Tool just connects the points and draws the wire however it wants. Instead, you can connect an output to a node, then connect that node to another component or node, etc. 1

Background: Seven-Segment Display In the second laboratory exercise, you will be building a circuit to drive a seven-segment display. This device consists of seven LED bars that are illuminated to form digits and letters. You should be familiar with the pattern from clock radios, calculators, etc. The seven LED s are arranged like this: We can make numbers by filling in (or turning on) one or more of the segments. Here are the 7-segment representations of the digits 0 through 7: 0 1 2 3 4 5 6 7 The segments are named a through g, where a is the top segment, b is the top right, and so on, as shown in the following diagram. a f g b e c d To display a certain digit, we need to specify which segments should be turned on. For example, to display the digit 7, we must turn on a, b, and c. To display the digit 4, we must turn on b, c, f, and g. Suppose we have a three-bit unsigned binary number n[2:0], representing the values from 0 to 7. For each segment in the display, we can build a logic circuit that tells whether that segment should be turned on to display n[2:0]. In Prelab Exercises 2 and 3, you will create a truth table and derive the logic equations for each segment. Instead of the raw three-bit number, suppose we use a 3-to-8 decoder 1 to generate signals d0, d1,, d7. In Prelab Exercise 4, you will derive the logic equations for each segment using d0-d7, rather than n[2:0]. These are the equations that you will actually use in Lab Exercise 2 1 See Section 3.3.1 in the text. 2

Name: Prelab Exercises (30 points) You must turn in the prelab exercises at the beginning of the lab period. Make a copy of the equations in (4) for yourself before the lab begins. 1. (6 pts) Read the introduction to MultiMedia Logic posted on the Lab web site. Answer the following questions: (a) Name three details of a circuit implementation that are ignored by this logic simulator. (b) Why are three states (True, False, and Unknown) used by the logic simulator, rather than two? (c) List the steps needed to connect two components together in the MultiMedia Logic simulator. 2. (8 pts) Fill in the truth table below for the seven-segment display. The first row is done for you. n n[2] n[1] n[0] a b c d e f g a 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 2 0 1 0 f g b 3 0 1 1 4 1 0 0 e c 5 1 0 1 d 6 1 1 0 7 1 1 1 3

Name: 3. (8 pts) Based on the truth table above, write the logic equation (using n[2], n[1], and n[0] as inputs) for each of the seven segments. a = b = c = d = e = f = g = 4. (8 pts) Now assume we have a 3-to-8 decoder, as described in the text, with outputs d0-d7. Output d0 is 1 if n[2:0] = 000; d1 is 1 if n[2:0] = 001, etc. Write the equation for each of the seven segments, using d0-d7 as inputs. The first one is done for you. Try to use the minimum number of terms in your equations. Note that it may be easier to use a NOR gate to combine cases in which the segment is not turned on. a = d0 + d2 + d3 + d5 + d6 + d7 = d1 + d4 b = c = d = e = f = g = 4

Lab Exercises (70 points) NOTE: This lab is due at the end of the lab period. You must turn in your truth table and save your circuit files on your lab instructor s floppy to get credit for this lab. If you have a lab partner, you can turn in your work together. Make sure both of your names are on the truth table and on each circuit that you submit. 1. Logic Analysis (10 points) First start the MultiMedia Logic program your lab instructor will tell you how. Open the circuit file called lab1-1.lgi in the Lab1 directory. Immediately, save the circuit to a different file on the Desktop. (Ask your lab instructor if you don t know how.) This is because the file is read-only, but the simulator wants to modify the file when it runs. This circuit uses a memory element to implement an arbitrary logic function with one output. Your task is to figure out the logic function. Simulate the circuit (by pushing the play button) and toggle the switches controlling the A, B, and C inputs. Notice how the output LED changes for each combination of inputs. (5 pts) On a separate sheet of paper, write the truth table for this function. (5 pts) Underneath the truth table, write a logic equation that corresponds to the truth table. Stop the simulation (using the stop button) and close the circuit without saving it. Turn in your truth table and equation to the lab instructor before leaving. 2. DeMorgan s Law (10 points) Create a new circuit (using the New Project button). Build a circuit that demonstrates DeMorgan s Law, using two inputs and two outputs. One output LED shows A + B ; the other shows A B. Demonstrate to the lab instructor that both outputs are always equal, for all input values. Have the instructor make a note on your truth table (Exercise 1) that this circuit was completed. When the lab instructor has signed off, delete the circuit (project) without saving it. 3. Creating a Logic Circuit (30 points) Open the circuit file called lab1-2.lgi in the Lab1 directory. 5

Immediately save the circuit to a different file on the Desktop. This is the file that you will use to implement the 7-segment display described above. On the left are the three input bits, n[2:0]. Note that the most significant bit (n[2]) is on the bottom and the least significant bit (n[0]) is on the top. These inputs are fed into a 3-to-8 decoder, resulting in eight signals, D0-D7. On the right of the circuit is the seven-segment display. We have used a pair of LED s to approximate each LED bar of the display. A node is provided for each output signal (a-g), and these nodes are already connected to the appropriate LED s. Using the equations you developed in Prelab Exercise 4, create the logic circuit to display the input number (n[2:0]) on the seven-segment display. Simulate your circuit to make sure it works correctly. (You don t have to wait until the entire circuit is complete before simulating.) Add your name (or both names, if you have a lab partner) to the bottom right corner of the circuit, using the Text Tool. Save the circuit (to your newly-created file) and close it. When you re done with the next exercise, copy both circuit files onto the lab instructor s floppy disk. 4. Using a Multiplexer (15 points) Open the circuit file called lab1-3.lgi in the Lab1 directory. Immediately, save the circuit to a different file on the Desktop. This circuit will give you practice in using a multiplexer 2 to choose between multiple inputs. To the left is a hexadecimal input pad. Clicking on one of the buttons will cause the four output signals to take on the corresponding digit. Note that the least significant bit (0) is on the bottom, and the most significant bit (3) is on the top. On the right is a collection of 2:1 multiplexers, one for each bit. The outputs of the multiplexers are connected to LED s and to a seven-segment display. Add logic gates to the circuit to implement the following function: if the input number is even, perform a one-bit logical left shift; else, take the one s complement (flip all bits). You ll need to provide the logic to compute each function, and also the logic to make the decision about which result to pass through the mux. Simulate your circuit to make sure it works properly. Add your name (or both names, if you have a lab partner) to the bottom right corner of the circuit, using the Text Tool. 2 See Section 3.3.2 of the text. 6

Save the circuit (to your newly-created file) and close it. Copy both circuit files (from 2 and 3) onto the lab instructor s floppy disk. 5. Cleanup (5 pts) Delete your files from the desktop. If you accidentally overwrote or deleted any of the circuit files used in the lab, get the lab instructor to restore them. If the instructor finds any of your files on the desktop, or finds that lab circuit files have been deleted or altered (without notifying the instructor), you will not get credit for these 5 points. 7