Experiment # 12. Traffic Light Controller

Similar documents
Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Lecture 11: Synchronous Sequential Logic

INC 253 Digital and electronics laboratory I

LAB #4 SEQUENTIAL LOGIC CIRCUIT

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

Chapter 5 Synchronous Sequential Logic

Laboratory Exercise 7

Universidad Carlos III de Madrid Digital Electronics Exercises

Laboratory Exercise 7

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

ECE 301 Digital Electronics

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

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

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Chapter 5 Sequential Circuits

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM)

Dr.Mohamed Elmahdy Winter 2015 Eng.Yasmin Mohamed. Problem Set 6. Analysis and Design of Clocked Sequential Circuits. Discussion: 7/11/ /11/2015

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

Administrative issues. Sequential logic

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

2 Sequential Circuits

A Combined Combinational-Sequential System

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

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

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

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

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Activity Sequential Logic: An Overview

Traffic Light Controller

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Chapter. Synchronous Sequential Circuits

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

Chapter 11 State Machine Design

CSC258: Computer Organization. Combinational Logic

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

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

ELCT201: DIGITAL LOGIC DESIGN

AIM: To study and verify the truth table of logic gates

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

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

CHAPTER 11 LATCHES AND FLIP-FLOPS

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Logic Design. Flip Flops, Registers and Counters

ECE 331 Digital System Design

ECE 301 Digital Electronics

Engr354: Digital Logic Circuits

LAB 7. Latches & Flip Flops

Flip-Flops and Sequential Circuit Design

Last time, we saw how latches can be used as memory in a circuit

Digital Integrated Circuits EECS 312

LATCHES & FLIP-FLOP. Chapter 7

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

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Introduction to Computer Engineering EECS dickrp/eecs203/

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

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

1. Synopsis: 2. Description of the Circuit:

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

Introduction to Sequential Circuits

Introduction to Sequential Logic Circuits (Class /16/12)

To design a sequential logic circuit using D-Flip-flop. To implement the designed circuit.

# "$ $ # %!"$!# &!'$("!)!"! $ # *!"! $ '!!$ #!!)! $ "# ' "

Modeling Latches and Flip-flops

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

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

Modeling Latches and Flip-flops

Lecture 8: Sequential Logic

Side Street. Traffic Sensor. Main Street. Walk Button. Traffic Lights

Combinational / Sequential Logic

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

Unit 12 Design Solutions Solutions to Unit 12 Design and Simulation Problems

Register Transfer Level in Verilog: Part II

EET2411 DIGITAL ELECTRONICS

COMP2611: Computer Organization Building Sequential Logics with Logisim

Asynchronous (Ripple) Counters

EE292: Fundamentals of ECE

Chapter 5 Sequential Circuits

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

CH 11 Latches and Flip-Flops

Other Flip-Flops. Lecture 27 1

CHAPTER 4 RESULTS & DISCUSSION

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

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

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

Fundamentals of Computer Systems

Sequential Circuits: Latches & Flip-Flops

Transcription:

Experiment # 12 Traffic Light Controller Objectives Practice on the design of clocked sequential circuits. Applications of sequential circuits. Overview In this lab you are going to develop a Finite State Machine (FSM) for a traffic light controller that will control the operation of traffic lights at the cross road connection shown in Figure12.1. One-Way Street Figure 12.1: The three traffic light signals 1

Design Specifications There are three traffic light signals (S 1, S 2, and S 3 ), each alternating between two states, RED and GREEN. These signals control the traffic flow on the three roads, road 1, road 2, road 3 in four possible states as follows. In STATE 1, traffic coming through road 1 is allowed to go forward or left. (S 1 = GREEN, S 2 = RED, S 3 = RED) In STATE 2, traffic coming through road 2 is allowed to go forward or left. (S 1 = RED, S 2 = GREEN, S 3 = RED) In STATE 3, traffic coming through road 3 is allowed to go forward or left. (S 1 = RED, S 2 = RED, S 3 = GREEN) In STATE 4: no traffic coming from any road is allowed (All signals are RED) is a one-way street. No traffic can possibly come out from road 4. States 1 3 are enumerated in Figure 12.2 (a) Stage 1 (b) Stage 2 (c) Stage 3 Figure 12.2: Traffic states 2

The operation of the three light signals (-) is controlled through an arrangement of traffic sensors and traffic light controller circuit as shown in Figure 12.3. There are three traffic sensors x 1, x 2 & x 3, which sense the presence of traffic on the roads 1-3 as illustrated in Table 12.1. The controller operation is determined by the output of these three sensors as enumerated in Table 12.2. TRAFFIC SENSOR X1 X2 X3 TRAFFIC LIGHT CONTROLLER Figure 12.3: Traffic Sensor and Traffic Light Controller Circuit Table 12.1: Traffic Sensor Signals x 3 x 2 x 1 Indication 0 0 0 All roads have no traffic 0 0 1 and have no traffic 0 1 0 and have no traffic 0 1 1 and have traffic 1 0 0 has traffic 1 0 1 has no traffic 1 1 0 and has no traffic 1 1 1 All roads have traffic Table 12.2: Traffic Sensors and Controller Operation x 3 x 2 x 1 Indication 0 0 0 Stay at STATE 4 0 0 1 Stay at STATE 1 0 1 0 Stay at STATE 2 0 1 1 Alternate between STATE 1 and STATE 2 1 0 0 Stay at STATE 3 1 0 1 Alternate between STATE 1 and STATE 3 1 1 0 Alternate between STATE 2 and STATE 3 1 1 1 Normal operation: STATE 1, STATE 2, STATE 3, STATE 1,.. The design of the traffic controller module requires using D-flip flops with asynchronous clear. Assume that the controller has three inputs: x 3, x 2, x 1 coming from the traffic sensor, and three outputs: S 1, S 2, and S 3, which control the operation of the three traffic light signals (logic 1 represents a GREEN signal and logic 0 represents a RED signal). 3

Pre-Lab You are expected to know the design procedure of synchronous sequential circuit. Obtain either a state diagram or a state table for the circuit. In this case, it would be appropriate to get the state table directly (use the table below). Derive the flip-flop input equations from the state table. Derive output equations for the traffic signals. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 x 3 x 2 x 1 A B A + / D A B + / D B S 1 S 2 S 3 4

In-Lab In a new project, open a new schematic sheet and implement the functions that you have obtained in the pre-lab. Use D-Flip flops with Asynchronous Clear from the library. Constrain the inputs of your circuit to 3 of the level switches (SWs) and the outputs to 3 LEDs. It is also preferable to constrain flip-flop outputs to LEDs. Use 2 BTNs, one to provide a clock signal (Beware of switch debouncing problems) and the other as an asynchronous clear. Connect these inputs to the respective inputs of the flip-flops. Check your circuit for errors and fix them. Simulate your design. Download your design. Verify its functionality by applying different input combinations and compare it with your state table. Demonstrate your work to the instructor. Post-Lab Document your design by providing a diagram of your circuit As a bonus propose a modification to your design that will take the following into account: If the circuit is alternating between different states (for example if x 3 x 2 x 1 = 1 1 1), each state should remain no more than 10 sec before moving to the next state and so on. 5