EET 1131 Unit 8 Code Converters, Multiplexers, and Demultiplexers

Slides:



Advertisements
Similar presentations
EET 1131 Unit 3 Basic Logic Gates
Advertisements

Functions of Combinational Logic
Digital Logic Design Week 7 Encoders, Decoders, Multiplexers, Demuxes.
Combinational Circuits
Functions and Functional Blocks
EET 1131 Unit 7 Arithmetic Operations and Circuits
Figure 8–1 A 2-bit asynchronous binary counter
Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 1 Digital Fundamentals.
Code Converters, Multiplexers and Demultiplexers
CHAPTER 6 Functions of Combinational Logic
Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 1 The Digital.
MSI Logic Circuits Wen-Hung Liao, Ph.D.. Objectives Analyze and use decoders and encoders in various types of circuit applications. Compare the advantages.
Digital Fundamentals Floyd Chapter 6 Tenth Edition
COMBINATIONAL CIRCUITS USING TTL 74XX ICS
EET 1131 Unit 12 Shift Registers
OTHER COMBINATIONAL LOGIC CIRCUITS
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 2 OF 3)
1 Chapter 6 Functions of Combinational Logic. 2 Figure 6--1 Logic symbol for a half-adder Adder.
EET 1131 Unit 11 Counter Circuits  Read Kleitz, Chapter 12, skipping Sections and  Homework #11 and Lab #11 due next week.  Quiz next week.
Figure 6–1 Logic symbol for a half-adder. Open file F06-01 to verify operation. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education,
Digital Fundamentals with PLD Programming Floyd Chapter 8
Logic Gates Combinational Circuits
Figure 9–1 The flip-flop as a storage element.
Combinational Logic Chapter 4.
Top-down modular design
Combinational Logic Design
9 MSI Logic Circuits Some of digital system operations: Decoding and encoding; multiplexing; demultiplexing; comparison; code converting; data busing.
1 Digital Logic Design Week 7 Decoders, encoders and multiplexers.
MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5) Dr. Costas Kyriacou and Dr. Konstantinos Tatas ACOE161 - Digital Logic.
Functions of Combinational Logic
Documentation Standards Circuit specification. –Description of what the system is supposed to do, including a description of all inputs and outputs and.
Combinational Logic By Taweesak Reungpeerakul
WEEK #9 FUNCTIONS OF COMBINATIONAL LOGIC (DECODERS & MUX EXPANSION)
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Combinational Design, Part 3: Functional Blocks
Digital Logic Design Lecture # 9 University of Tehran.
Logical Circuit Design Week 6,7: Logic Design of Combinational Circuits Mentor Hamiti, MSc Office ,
Functions of Combinational Logic By Taweesak Reungpeerakul
CYU / CSIE / Yu-Hua Lee / E- 1 數位邏輯 Digital Fundamentals Chapter 9 Counters.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Summary Half-Adder pp302Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry.
Code Converters, Multiplexers and Demultiplexers
© 2009 Pearson Education, Upper Saddle River, NJ All Rights Reserved Floyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
EKT 121 / 4 DIGITAL ELECTRONICS 1
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #8 FUNCTIONS OF COMBINATIONAL LOGIC (ENCODER & DECODER, MUX & DEMUX)
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
A multiplexer (MUX) selects one data line from two or more input lines and routes data from the selected line to the output. The particular data line that.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Code Converters, Multiplexers and Demultiplexers
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Decoders A decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence.
ACOE161 (Spring2007)MSI Devices1 Revision on MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
MSI Circuits.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
EGR 2131 Unit 6 Combinational Building Blocks
Combinational Circuits
Combinational Logic Circuits
Digital Fundamentals Floyd Chapter 6 Tenth Edition
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Advanced Digital design
Digital Design Fundamentals
Chapter 6 Functions of Combinational Logic
Digital System Design Combinational Logic
Presentation transcript:

EET 1131 Unit 8 Code Converters, Multiplexers, and Demultiplexers Read Kleitz, Chapter 8, skipping Sections 8-2 and 8-4. Homework #8 and Lab #8 due in a week and a half. Quiz when Homework #8 is due. -Handouts: Practice sheets for comparator, comparator timing diagram, decoder, encoder, Gray code, MUX, DEMUX. Comparator: 7485 Decoders: 74138, 7442, 74154 Encoders: 74147, 74148 Code converters: 7447, 74184

Types of Chips Here are the kinds of chips we’ll study in the coming weeks: Comparators Decoders Encoders Chapter 8 Code converters Multiplexers Demultiplexers Latches & Flip-flops Chapter 10 Counters Chapter 12 Shift registers Chapter 13 Multivibrators Chapter 14 Memory Chapter 16 Day 1 of this unit=1st two; day 2=2nd two; day 3=3rd two.

Types of Chips (Continued) For each type of chip listed on previous slide, you should understand: What that type of chip does, and why it’s useful. How you could build such a circuit out of gates. Specific details of actual chips in each category.

Example Solution Comparators The function of a comparator is to compare the magnitudes of two binary numbers to determine the relationship between them. In the simplest form, a comparator can test for equality using XNOR gates. Example How could you test two 4-bit numbers for equality? Solution AND the outputs of four XNOR gates. A1 B1 A2 B2 -Have them do two examples: 1.) A=1001, B=1001; 2.) A=1001, B=0101 Output A3 B3 A4 B4

Comparators IC comparators provide outputs to indicate which of the input numbers is larger or if they are equal. Cascading inputs are provided to expand the comparator to larger numbers. A1 A0 A2 A3 B1 B0 B2 B3 Cascading inputs COMP A = B A < B A > B 3 A B Outputs -Note numbering of input bits: A0 and B0 are LSBs, A3 and B3 are MSBs. -Have them do practice sheet: A=1001, B=0101 The IC shown is the 4-bit 7485.

Comparators IC comparators can be expanded using the cascading inputs as shown. The lowest order comparator has a HIGH on the A = B input. Outputs A1 A0 A2 A3 B1 B0 B2 B3 COMP A = B A < B A > B 3 A B A5 A4 A6 A7 B5 B4 B6 B7 +5.0 V LSBs MSBs -Note numbering of input bits: A0 and B0 are LSBs, A7 and B7 are MSBs. -Have them do practice sheet: 1) A=01011001, B=01010111; 2) A=01111111, B=10000000

Comparator Chip 7485 Four-bit magnitude comparator -Do practice timing diagram for 7485.

Enable Pins Many of the chips we’ll study have enable inputs. Depending on the logic level at this pin, the chip is either enabled or disabled. When the chip is enabled, it performs its intended function and the outputs behave as you would expect. When the chip is disabled, then (usually) all outputs are forced to their inactive state, regardless of the other inputs to the chip. Common names for enable pins include EN, G (for “gate”), and CS (for “chip select”). -Example: enable line on a 2-bit comparator chip. 8

Active-High versus Active-Low Pins Each input pin and output pin on a chip is either active-high or active-low. In a logic symbol: Active-low pins are marked with a bubble or triangle. Active-high pins have no bubble or triangle. Active-high pins: the pin is active when there’s a HIGH on that pin. Many chips have active-low pins: the pin is active when there’s a LOW on that pin. -Input example: enable line on a comparator chip. -Output example: output pins on a comparator.

Example: 74154 Decoder -Note different pin names as well as different conventions for active-low. -Note: Individual pins are either active-high or active-low. It’s not correct to refer to a chip as being active-high or active-low. From Floyd, p. 306 From Texas Instrument datasheet

Decoders, Encoders, & Code Converters Decoders convert a binary code into a single active output representing the code’s value. Encoders generate a coded output from a single active input line. Code converters take one input code (such as BCD) and convert it to another code (such as binary). -Demo a decoder with 5 students: me as 2-bit input, one student as decoder, the other four as outputs. -Demo an encoder with 5 students: four students as inputs, one student as encoder.

Decoders A decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence of the binary code 0011 are shown. The first has an active HIGH output; the second has an active LOW output. A0 A0 A1 X A1 X A2 A2 A3 A3 Active HIGH decoder for 0011 Active LOW decoder for 0011

Decoders Assume the output of the decoder shown is a logic 1. What are the inputs to the decoder? Question

Decoders IC decoders have multiple outputs to decode any combination of inputs. For example the hex decoder shown here has 16 outputs – one for each combination of binary inputs. Question For the input shown, what is the output?

Decoders X/Y A specific integrated circuit decoder is the 74154, a 4-to-16 decoder. It includes two active LOW chip select lines which must be at the active level to enable the outputs. These lines can be used to expand the decoder to larger inputs. A0 A1 A2 A3 CS1 CS2 EN 74154

Octal Decoder 3 data input pins for input code. 8 output pins. Also called 1-of-8 decoder or 3-line-to-8-line decoder. May have other inputs and outputs too, such as enable inputs. Example chip: 74138 -Follow link for pin-out and logic symbol. -Active-high data inputs, active-low outputs, mixture of enable inputs. -Pins are laid out sensibly. -Do timing diagram for 74138.

Hex Decoder 4 data input pins for input code. 16 output pins. Also called 1-of-16 decoder or 4-line-to-16-line decoder. May have other inputs and outputs too, such as enable inputs. Example chip: 74154 -Follow link for pin-out and logic symbol. -Active-high data inputs, active-low outputs, active-low enable inputs. -Pins are laid out sensibly.

BCD Decoder 4 data input pins for input code. 10 output pins. Also called 1-of-10 decoder or 4-line-to-10-line decoder. May have other inputs and outputs too, such as enable inputs. Example chip: 74LS42 - Follow link for pin-out and logic symbol. -Active-high data inputs, active-low outputs, no enable inputs. -Pins are laid out sensibly.

Encoders An encoder accepts an active logic level on one of its inputs and converts it to a coded output, such as BCD or binary. 1 The basic logic diagram is shown. This encoder has an input for each decimal digit, and four outputs that represent the binary code for the active input digit. There is no zero input because the outputs are all LOW when the input is zero. A0 2 3 A1 4 5 A2 6 7 Go straight to next slide. 8 A3 9

Example Solution Encoders Show how the BCD encoder converts the decimal number 3 into a BCD 0011. Example The top two OR gates have ones as indicated with the red lines. Thus the output is 0011. Solution 1 1 1 A0 2 3 1 A1 -Do it on practice sheet. -Note what happens if inputs 3 and 5 are high at same time. 4 5 A2 6 7 8 A3 9

Encoders The 74147 is an example of an IC encoder. It is has ten active-LOW inputs and converts the active input to an active-LOW BCD output. VCC This device offers additional flexibility in that it is a priority encoder. This means that if more than one input is active, the one with the highest order decimal digit will be active. HPRI/BCD Decimal input BCD output -Could call this a 10-line-to-4-line encoder. -Introduce concept of priority encoder. 74HC147 The next slide shows an application … GND

Encoders Keyboard encoder VCC Encoders Keyboard encoder HPRI/BCD BCD complement of key press 74HC147 The zero line is not needed by the encoder, but may be used by other circuits to detect a key press.

BCD Encoder 10 input pins. 4 output pins for output code. Also called 10-line-to-4-line encoder. May have other inputs and outputs too, such as enable inputs. Example chip: 74147 -Follow link for pin-out and logic symbol. -Active-low data inputs, active-low outputs, no enable inputs. -Pins are not laid out sensibly. -Priority encoder. -Do timing diagram for 74147.

Octal Encoder 8 input pins. 3 output pins for output code. Also called 8-line-to-3-line encoder. May have other inputs and outputs too, such as enable inputs. Example chip: 74148 -Follow link for pin-out and logic symbol. -Active-low data inputs, active-low outputs, other inputs & outputs. -Pins are not laid out sensibly. -Priority encoder.

Different Numeric Codes Several different codes exist for using 1s and 0s to represent positive integers. Standard binary code Example: In standard binary, 15 is 1111. Binary-coded decimal (BCD) Example: In BCD, 15 is 0001 0101. Gray code Example: In Gray code, 15 is 1000.

Four-Bit Gray Code The key feature of Gray code is that only one bit changes when we increase a number by one. This is not true of standard binary.

Why is Gray Code Useful? Gray code is used for rotary encoders that sense the angular position of a shaft or axle. From Wikipedia article on rotary encoders: Do Gray code practice sheet. Standard 3-bit binary code: no good! 3-bit Gray code: better!

Code Converters If a digital system needs to handle numbers using two different codes, it needs circuitry to convert between the two codes. Examples of code converters: 74184 BCD-to-binary and binary-to-BCD converter Binary-to-Gray code or Gray-code-to-binary converters (see next slide)

Gray Code/Binary Converters Figure 8-40. Binary-to-Gray-code converter Figure 8-41. Gray-code-to-binary converter

Question Multiplexers A multiplexer (MUX) selects one data line from two or more input lines and routes data from the selected line to the output. The particular data line that is selected is determined by the select inputs. Two select lines are shown here to choose any of the four data inputs. Select inputs S0 1 S1 D0 Data output Question Data inputs D1 -MUX = Data selector; DEMUX = data distributor. -Introduce examples of MUXes and DEMUXes as traffic routers: such as phone lines from Dayton to Phoenix. -Data can be analog or digital. -Do practice sheet. D2 Which data line is selected if S1S0 = 10? D3 D2

Some Multiplexer Chips 74150 (16-input MUX) 74151 (8-input MUX) 74153 (dual 4-input MUX) 74157 (quad 2-input MUX) -Discuss common control block on symbols for ‘53 and ‘157. -Do timing diagram for 74151 and troubleshooting for MUXes.

Demultiplexers A demultiplexer (DEMUX) performs the opposite function from a MUX. It switches data from one input line to two or more data lines depending on the select inputs. The 74LS138 was introduced previously as a decoder but can also serve as a DEMUX. When connected as a DEMUX, data is applied to one of the enable inputs, and routed to the selected output line depending on the select variables. Note that the outputs are active-LOW as illustrated in the following example… Data select lines Data outputs Enable inputs First go back to previous MUX slide and sketch a hypothetical DEMUX. 74LS138

Example Solution Demultiplexers A A A G G LOW LOW G Y Y Y Y Y Y Y Y A Demultiplexers 1 A Determine the outputs, given the inputs shown. 2 Example G 1 Solution G LOW 2A The output logic is opposite to the input because of the active-LOW convention. (Red shows the selected line). G LOW 2B Y Y 1 Data select lines Y 2 Y Data outputs -Do practice sheet. 3 Y 4 Enable inputs Y 5 Y 6 Y 74LS138 7

Some Demultiplexer Chips 74138 (3-line to 8-line Decoder/DEMUX) 74154 (4-line to 16-line Decoder/DEMUX) 74139 (dual 2-line to 4-line Decoder/DEMUX) -Do troubleshooting exercise for 74139/154.