To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.



Similar documents
Digital Logic Design Sequential circuits

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Module 3: Floyd, Digital Fundamental

Asynchronous Counters. Asynchronous Counters

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Lesson 12 Sequential Circuits: Flip-Flops

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Lecture 8: Synchronous Digital Systems

Counters & Shift Registers Chapter 8 of R.P Jain

Lecture-3 MEMORY: Development of Memory:

Chapter 8. Sequential Circuits for Registers and Counters

ECE380 Digital Logic

Counters and Decoders

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

BINARY CODED DECIMAL: B.C.D.

Asynchronous counters, except for the first block, work independently from a system clock.

Wiki Lab Book. This week is practice for wiki usage during the project.

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

CHAPTER 11: Flip Flops

Registers & Counters

Master/Slave Flip Flops

Contents COUNTER. Unit III- Counters

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

ASYNCHRONOUS COUNTERS

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Memory Elements. Combinational logic cannot remember

Engr354: Digital Logic Circuits

Cascaded Counters. Page 1 BYU

Design: a mod-8 Counter

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Combinational Logic Design Process

The components. E3: Digital electronics. Goals:

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CHAPTER 11 LATCHES AND FLIP-FLOPS

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Lab 1: Study of Gates & Flip-flops

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Chapter 9 Latches, Flip-Flops, and Timers

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Counters are sequential circuits which "count" through a specific state sequence.

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Upon completion of unit 1.1, students will be able to

Decimal Number (base 10) Binary Number (base 2)

CS311 Lecture: Sequential Circuits

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

7. Latches and Flip-Flops

Counters. Present State Next State A B A B

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Fig1-1 2-bit asynchronous counter

A Lesson on Digital Clocks, One Shots and Counters

A Lesson on Digital Clocks, One Shots and Counters

Modeling Latches and Flip-flops

Operating Manual Ver.1.1

Theory of Logic Circuits. Laboratory manual. Exercise 3

CHAPTER 3 Boolean Algebra and Digital Logic

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Sequential Logic Design Principles.Latches and Flip-Flops

Digital Controller for Pedestrian Crossing and Traffic Lights

A New Paradigm for Synchronous State Machine Design in Verilog

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Systems I: Computer Organization and Architecture

DEPARTMENT OF INFORMATION TECHNLOGY

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

CSE140: Components and Design Techniques for Digital Systems

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Layout of Multiple Cells

Chapter 5. Sequential Logic

Digital Fundamentals

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Sequential Logic: Clocks, Registers, etc.

PURDUE UNIVERSITY NORTH CENTRAL

Modeling Registers and Counters

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Digital Electronics Detailed Outline

State Machines in VHDL

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Flip-Flops, Registers, Counters, and a Simple Processor

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

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Electronics Merit Badge Class 3. 1/30/2014 Electronics Merit Badge Class 3 1

Set-Reset (SR) Latch

Memory unit. 2 k words. n bits per word

Transcription:

8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory. Flip-flops are introduced and connected to make a counter. The number of flip-flops used and how they are connected determine the number of states and the sequence of the states that the counter goes through in each complete cycle. can be classified into two broad categories: a. Synchronous counters b. Asynchronous counters 8.3 Synchronous In synchronous counter all clocks of flip-flops are connected to the same clock signal. Thus, all flip-flop outputs change state at precisely the same moment. Table 8.1 shows the states of a 2-bit counter. Each state is an increment to its previous state by 1, which means that the counter is an up counter. It is clear from the table that the first flip-flop (FF0) toggles at the clock edge (either rising or falling), according to this, this part of the counter is implemented using T flip-flop and its input is always at high logic. The second flip-flop (FF1) toggles if the output of FF0 is 1. Then this part of the counter is also implemented with T flip-flop but with its input connected to the output of the previous flip-flop. Table 8.1: 2-bit counter. Q1 Q0 0 0 0 1 1 0 1 1 405312: Digital Logic and Digital Electronics lab. 49

Figure 8.1: 2-bit synchronous counter. 8.4 Asynchronous In asynchronous counter only the first flip-flop (least significant flip-flop) FF0 is clocked by a clock signal. The clock of the next flip-flops is triggered from the output of the previous flip-flop. The inherent delay in the flip-flop IC (time since the clock trigger until the signal appears on the output) causes Q1 to be triggered after Q0. Thus the transition of the Q output of the flip-flops can never occur at exactly the same time. Asynchronous counters are also implemented using T flip-flop. The inputs to all flip-flops are connected to logic high and only the clock signal decides if the flip-flop shall toggle, according to the output of the previous flip-flop. The implementation of a 2-bit asynchronous up counter is shown in Figure 8.2. Figure 8.2: 2-bit asynchronous counter circuit and timing diagram. Notice that the small delay between the CLK, Q0 and Q1 transitions is not shown in the timing diagram of Figure 8.2. 405312: Digital Logic and Digital Electronics lab. 50

For an asynchronous counter to become an up/down counter the circuit in Figure 8.3 is connected to the clock of each flip-flop (except FF0 of course because it is connected to CLK). Figure 8.3: Up/Down logic for asynchronous counters. 8.5 Counter Circuits Design Procedure The design procedure of counter circuits depends on the counter type. For asynchronous counter it is straight forward and it is explained through the following example. Example 8.1 Design a logic circuit that counts from 0 to 15 using asynchronous counter. Table 8.2: 4 bit counter. Q3 Q2 Q1 Q0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 405312: Digital Logic and Digital Electronics lab. 51

Solution: To count from 0 to 15 there is 16 states which mean 4 flip-flops are needed. By default when designing asynchronous counters, all flip-flop inputs are connected to 1 and only the first flip-flop is trigger with a clock input. By inspecting Table 8.2, Q1 is toggled when Q0 changes from1 to 0. Q2 is toggled when Q1 changes from 1 to 0. Q3 is toggled when Q2 changes from 1 to 0. The counter logic circuit is shown in Figure 8.4. Figure 8.4: Asynchronous 4-bit counter of Example 8.1 For synchronous counter, the design procedure is the same procedure of designing using flip-flops, starting from the state diagram and ending with the logic circuit. Example 8.2 Design a logic circuit that counts from 0 to 4 then back to 0 only if an input signal is 1. Use synchronous counter. Solution: Step one: Figure 8.5 shows the state diagram. Figure 8.5: Example 8.2 state diagram 405312: Digital Logic and Digital Electronics lab. 52

Step two and three: The state and excitation tables are shown in table 8.3. Table 8.3: State and excitation tables of Example 8.2. Current state Input Next state Flip flop 1 Flip flop 0 Q1 Q0 U Q1 + Q0 + J1 K1 J0 K0 0 0 0 0 0 0 X 0 X 0 0 1 0 1 0 X 1 X 0 1 0 0 1 0 X X 0 0 1 1 1 0 1 X X 1 1 0 0 1 0 X 0 0 X 1 0 1 1 1 X 0 1 X 1 1 0 1 1 X 0 X 0 1 1 1 0 0 X 1 X 1 Step four: Construct K-maps for each flip-flop inputs (J and K) J0=U Figure 8.6: K-map for J0 in Example 8.2. 405312: Digital Logic and Digital Electronics lab. 53

Figure 8.7: K-map for K0 in Example 8.2. K0= U Notice that even though the implementation is with JK flip-flop the result is that K0=J0 then it is a T flip-flop. J1=K1=Q0.U Figure 8.8: K-map for J1=K1 in Example 8.2. Step five: The logic circuit is implemented in Figure 8.9. 405312: Digital Logic and Digital Electronics lab. 54

Figure 8.9: The logic circuit for Example 8.2 405312: Digital Logic and Digital Electronics lab. 55

Pre-Lab 8 1- Design a synchronous counter that counts from 0 to 7 if an input R is high and from 7 to 0 if the input R is low. You are required to draw the state diagram, the state table, the excitation table. Then to obtain the inputs to the flip-flops (J1, K1, J2, and so on). But you are NOT required to draw the counter logic circuit. Lab Work 8 Use the synchronous 4-bit counter IC 74ls193 and 3*8 decoder IC 74ls138 to implement a counter that counts from 2 to 5. Homework 8 1. Design a 2 bit asynchronous up counter using the JK flip flop shown in Figure 8.10 (take care that the flip flop has a rising edge clock). Figure 8.10: Positive edge JK-flip flop 2. Using the 74193 4-bit counter you used during your lab work, design an up counter that counts from 2 to 12. To detect the presence of 12, you may use active low 3*8 decoder. 405312: Digital Logic and Digital Electronics lab. 56

Figure 8.11: 74193 up down counter. 3. Using the 74193 4-bit counter you used during your lab work, design an up/down counter that will count up if an input X is 1 and will count down if X is 0. You can use ON LY one clock for both the COUNT UP and the COUNT DOWN terminals. 405312: Digital Logic and Digital Electronics lab. 57