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



Similar documents
Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Asynchronous Counters. Asynchronous Counters

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

Digital Logic Design Sequential circuits

Lecture 8: Synchronous Digital Systems

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

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

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

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

Flip-Flops and Sequential Circuit Design

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

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

Contents COUNTER. Unit III- Counters

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

CHAPTER 11 LATCHES AND FLIP-FLOPS

Module 3: Floyd, Digital Fundamental

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

Counters and Decoders

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

Lecture-3 MEMORY: Development of Memory:

Chapter 8. Sequential Circuits for Registers and Counters

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

ECE380 Digital Logic

Upon completion of unit 1.1, students will be able to

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

Counters & Shift Registers Chapter 8 of R.P Jain

Lesson 12 Sequential Circuits: Flip-Flops

Master/Slave Flip Flops

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

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

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

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

DEPARTMENT OF INFORMATION TECHNLOGY

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

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

Theory of Logic Circuits. Laboratory manual. Exercise 3

EC313 - VHDL State Machine Example

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Chapter 5. Sequential Logic

BINARY CODED DECIMAL: B.C.D.

Engr354: Digital Logic Circuits

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 16 Timing and Clock Issues

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

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

CS311 Lecture: Sequential Circuits

Digital Electronics Detailed Outline

CHAPTER 3 Boolean Algebra and Digital Logic

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

Chapter 9 Latches, Flip-Flops, and Timers

The components. E3: Digital electronics. Goals:

Sequential Logic Design Principles.Latches and Flip-Flops

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

Combinational Logic Design Process

Design: a mod-8 Counter

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

Digital Fundamentals

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

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Memory Elements. Combinational logic cannot remember

Digital to Analog and Analog to Digital Conversion

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

6-BIT UNIVERSAL UP/DOWN COUNTER

CSE140: Components and Design Techniques for Digital Systems

ASYNCHRONOUS COUNTERS

Digital Systems. Syllabus 8/18/2010 1

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

(Refer Slide Time: 00:01:16 min)

7. Latches and Flip-Flops

Interfacing Analog to Digital Data Converters

Systems I: Computer Organization and Architecture

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

EXPERIMENT 8. Flip-Flops and Sequential Circuits

EE360: Digital Design I Course Syllabus

Counters. Present State Next State A B A B

Lecture 11: Sequential Circuit Design

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

Cascaded Counters. Page 1 BYU

CpE358/CS381. Switching Theory and Logical Design. Class 10

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

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

SN54/74LS192 SN54/74LS193

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

Lab 1: Study of Gates & Flip-flops

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

Digital Controller for Pedestrian Crossing and Traffic Lights

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

. HIGH SPEED .LOW POWER DISSIPATION .HIGH NOISE IMMUNITY M54/M74HC190 M54/M74HC191 4 BIT SYNCHRONOUS UP/DOWN COUNTERS. fmax = 48 MHz (TYP.

HD61202U. (Dot Matrix Liquid Crystal GraphicDisplay Column Driver)

High-Stability Time Adjustment with Real-Time Clock Module

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Lecture 10: Sequential Circuits

Transcription:

Napier University School of Engineering Digital Design Clock + U1 out 5V "1" "2" "4" JK-FF D JK-FF C JK-FF B U8 SN7408 signal U4 SN74107 U5 SN74107 U6 SN74107 U3 SN7408 U2 J Q J Q & J Q & K CQ K CQ K CQ U9 SN7408 & "8" JK-FF A U7 SN74107 J Q + K CQ 5V By Klaus Jørgensen Napier No: 04007824 Lecturer Professor A. Almaini

Klaus Jørgensen Page 2 of 12 Abstract This paper is about a 16 bit binary counter made by JK-Flip-Flops, and one way how to display the number of 1 the counter counts in a 16 bit binary vector, there is also a state transition diagram, state table, karnaugh maps, test of the circuit in this paper.

Klaus Jørgensen Page 3 of 12 Table of Contents Table of Contents...3 Introduction...4 Input Signal...5 Counter...6 State Transition Diagram...6 State table of synchronous counter...7 Karnaugh maps...8 Circuit...9 Test...9 Display...10 Conclusion...11 Reference...12

Klaus Jørgensen Page 4 of 12 Introduction The counter has to count the numbers of ones 1 in a 16 bit binary vector, but all the 16 digits cannot all be 1 or 0 so the maximum number of 1 can only be 15 and the minimum number of 1 can only be 1. Input Counter Display Figure 1 Figure 1 shows a block diagram of the circuit the input signal is going to be made up by a clock signal and the signal that has to be counted 1 in. The counter is going to be made by 4 JK-Flip-Flops and some gates. The display is going to be made by 7-segments.

Klaus Jørgensen Page 5 of 12 Input Signal The input signal is a 16 digits binary vector, but it can not be all 1 or 0 there has to be some variation in the signal, to get an output that it is possible to count, the input signal has to be broken up to smaller pulses this can be don as shown in figure 2, each 1 in the input signal has a length of 1µs, to divide the input signal in to smaller piece it is anted together with a clock signal of 1MHz where each pulse has a length of 1µs. 1 1 = pt = 1μs f 1M The output of the And gate (U3) is shown in figure 2. U1 Clock U2 Input U3 SN7408 & Output Figure 2 The input signal is a 16 digits binary vector. Input = 1111 0001 1000 1010 Output = 8 1 T 5.00 Clock 0.00 5.00 Input 0.00 3.40 Output -100.00m 0.00 5.00u 10.00u 15.00u 20.00u Time (s) Figure 3

Klaus Jørgensen Page 6 of 12 Counter The 16 bit synchronous counter is made by 4 JK flip-flops and 2 gates, one JK flip-flop for each output, QA is the MSB (Most Significant Bit) and QD is the LSB (Least Significant Bit). Figure 4 shows a chart of how the JK flip-flop works. Q is the Present state, Q+ is the Next state, J and K is the inputs of the flipflop, to get from Q to Q+, J and K have to get the value as shown in figure 4 the x is a don t care state is can be 1 or 0 it doesn t matter [1]. Q Q+ J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 Figure 4 [1] State Transition Diagram To get a view of how the counter must work a State Transition diagram is made, it showed in figure 5. 1110 14 1111 15 0 0000 1 0001 1101 13 2 0010 1100 12 3 0011 1011 11 4 0100 1010 10 1001 9 8 7 6 5 0110 0101 1000 0111 Figure 5

Klaus Jørgensen Page 7 of 12 State table of synchronous counter Figure 6 shows the State table for the counter, it shows the Present, Next and the Change state of the counter. Present State. Next State. Change State. QA QB QC QD QA+ QB+ QC+ QD+ JA KA JB KB JC KC JD KD 0 0 0 0 0 0 0 0 1 0 x 0 x 0 x 1 x 1 0 0 0 1 0 0 1 0 0 x 0 x 1 x x 1 2 0 0 1 0 0 0 1 1 0 x 0 x x 0 1 x 3 0 0 1 1 0 1 0 0 0 x 1 x x 1 x 1 4 0 1 0 0 0 1 0 1 0 x x 0 0 x 1 x 5 0 1 0 1 0 1 1 0 0 x x 0 1 x x 1 6 0 1 1 0 0 1 1 1 0 x x 0 x 0 1 x 7 0 1 1 1 1 0 0 0 1 x x 1 x 1 x 1 8 1 0 0 0 1 0 0 1 x 0 0 x 0 x 1 x 9 1 0 0 1 1 0 1 0 x 0 0 x 1 x x 1 10 1 0 1 0 1 0 1 1 x 0 0 x x 0 1 x 11 1 0 1 1 1 1 0 0 x 0 1 x x 1 x 1 12 1 1 0 0 1 1 0 1 x 0 x 0 0 x 1 x 13 1 1 0 1 1 1 1 0 x 0 x 0 1 x x 1 14 1 1 1 0 1 1 1 1 x 0 x 0 x 0 1 x 15 1 1 1 1 0 0 0 0 x 1 x 1 x 1 x 1 Figure 6

Klaus Jørgensen Page 8 of 12 Karnaugh maps The karnaugh maps and the boolean algebra expression is shown below. JA KA QDQC\ QBQA 0 0 0 1 1 1 1 0 QDQC\ QBQA 0 0 0 1 1 1 1 0 0 0 0 0 x x 0 0 x x 0 0 0 1 0 0 x x 0 1 x x 0 0 1 1 0 x x 1 1 1 x 0 1 x 1 0 0 0 x x 1 0 x x 0 0 JA = QBQCQD KA = QBQCQD JB KB QDQC\ QBQA 0 0 0 1 1 1 1 0 QDQC\ QBQA 0 0 0 1 1 1 1 0 0 0 0 x x 0 0 0 x 0 0 x 0 1 0 x x 0 0 1 x 0 0 x 1 1 1 1 x x 1 1 x x 1 1 1 0 0 x x 0 1 0 x 0 0 x JB = QCQD KB = QCQD JC KC QDQC\ QBQA 0 0 0 1 1 1 1 0 QDQC\ QBQA 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 x x x x 0 1 x x x x 0 1 0 0 0 0 1 1 x x x x 1 1 1 1 1 1 1 0 1 1 1 1 1 0 x x x x JC = QD KC = QD JD KD QDQC\ QBQA 0 0 0 1 1 1 1 0 QDQC\ QBQA 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 x x x x 0 1 1 1 1 1 0 1 x x x x 1 1 x x x x 1 1 1 1 1 1 1 0 x x x x 1 0 1 1 1 1 JD = 1 KD = 1

Klaus Jørgensen Page 9 of 12 Circuit To make the counter there are used 4 JK Flip-Flops and 3 And-gates which is shown in figure 7. Clock + U1 out 5V "1" "2" "4" JK-FF D JK-FF C JK-FF B U8 SN7408 signal U4 SN74107 U5 SN74107 U6 SN74107 U3 SN7408 U2 J Q J Q & J Q & K CQ K CQ K CQ U9 SN7408 & "8" JK-FF A U7 SN74107 J Q + K CQ 5V Figure 7 Test Figure 8 shows a test of the circuit in figure 7 with the input signal 1111-0001- 0100-1010 which have eight 1 in it, this is shown in figure 8. T "1" 3.40-100.00m "2" 3.40-100.00m "4" 3.40-100.00m "8" 3.40-100.00m Clock 5.00 0.00 out 3.40-100.00m signal 5.00 0.00 0.00 5.00u 10.00u 15.00u 20.00u Time (s) Figure 8

Klaus Jørgensen Page 10 of 12 Display As display it is chosen to use two 7-segment displays this are setup as shown in figure 9. but to get the display to show a value above 9 the counter has to be rest when it reach the value 9 to begin to count from one again, U14, U15 and U16 gives a high out 1 when the U12 (7-segment) gets to 10, and at the same time U18 reset the counter to count from one again, U17 is a latches, it keeps the A input on U11 high 1 so that U13 shows one until the hole circuit is reset. Figure 9

Klaus Jørgensen Page 11 of 12 Conclusion The counter is made by 4 JK flip-flops and 2 And-gates, and this gives a 16-bit synchronous counter, the counter could have been made by only 4 JK flipflops if there wars used a 16-bit asynchronous counter, but the asynchronous counter has some disadvantages, the flip-flops in a asynchronous counter are not clocked at the same time, they are usually clocked by the output from the precedent flip-flop, the first flip-flop in the circuit is clocked by a external event, this means that the flip-flops in a asynchronous counter do not changes the output at the same time as it happens in a synchronous counter. The asynchronous counter is also slower then the synchronous counter because the delay from each flip-flop are added together to give the totally delay, hence, the more flip-flops there are used in a circuit or the more bits the counter has to count the slower the circuit will be. If the asynchronous counter are used in a large complex system, and there are happening a lot on each clock pulse there are a good possibility for an error because some IC s are faster then other and combined with the delay from the flip-flops, there is a possibility that some of the IC s will respond before others and this will give an error in the circuit. 24/11/2005 Klaus Jørgensen

Klaus Jørgensen Page 12 of 12 Reference 1. Digital teknik, by Leif Møller Andersen, (A Danish book). ISBN: 87-600-0126-7