Chapter 1 - MSI Logic Circuits_2013

72
Bui Van Hieu MSI logic circuits Copyright © 2013, Bui Van Hieu – All rights reserved Bui Van Hieu [email protected] Department of Computer Engineering Ho Chi Minh City University of Technology

Transcript of Chapter 1 - MSI Logic Circuits_2013

Page 1: Chapter 1 - MSI Logic Circuits_2013

Bui Van Hieu

MSI logic circuits

Copyright © 2013, Bui Van Hieu – All rights reserved

Bui Van Hieu

[email protected]

Department of Computer Engineering

Ho Chi Minh City University of Technology

Page 2: Chapter 1 - MSI Logic Circuits_2013

MSI logic circuits

LOGIC DESIGN

Logic familyLogic family

MemoryMemory

ADC / DACADC / DAC

MICRO-CONTROLLER

Page 3: Chapter 1 - MSI Logic Circuits_2013

Content

Encoder / Decoder

Data busingMultiplexer /

Demultiplexer

Page 4: Chapter 1 - MSI Logic Circuits_2013

What is an encoder / decoder ?

Encoder / Encoder / Code A Code BEncoder / DecoderEncoder / Decoder

Code A Code B

N inputs M outputs

Page 5: Chapter 1 - MSI Logic Circuits_2013

1 of 2N

Decoder1 of 2N

Decoder

N inputs 2N outputs

Inputs represent a binary number

Activate only one output corresponding

N inputs 2N outputs

Page 6: Chapter 1 - MSI Logic Circuits_2013

1-of-8 (3-to-8) decoder

C(MS

B)

B A O7 O6 O5 O4 O3 O2 O1 O0

0 0 0 1 1 1 1 1 1 1 0

0 0 1 1 1 1 1 1 1 0 1

0 1 00 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

Page 7: Chapter 1 - MSI Logic Circuits_2013

1-of-8 decoder circuit

Page 8: Chapter 1 - MSI Logic Circuits_2013

1-of-8 decoder IC (74138)

Page 9: Chapter 1 - MSI Logic Circuits_2013

Exercises

Determine outputs of 74xx138

E3=E2=E1=0 A2=A1=0 A0=0

E3=1, E2=E1=0 A2=0 A =A =1

3 2 1 2

A1=A0=1

Page 10: Chapter 1 - MSI Logic Circuits_2013

74138 circuit

Page 11: Chapter 1 - MSI Logic Circuits_2013

Problems 1

5-to-32 decoder5-to-32 decoder

7413

87

413

8

741

38

741

38

Implement 5-to-32 decoder

from four74138s

5 inputs 32 outputs

7413

87

413

8741

38

741

38

741

38

741

38

741

38

741

38

.

.

.

74138s

Page 12: Chapter 1 - MSI Logic Circuits_2013

7442 IC (4-to-10 decoder)

All of outputs are deactivated if an invalid input is applied(1010 1111)

Page 13: Chapter 1 - MSI Logic Circuits_2013

Application example

Provide timing and sequencing operations

Page 14: Chapter 1 - MSI Logic Circuits_2013

BCD-to-7-segment Decoder/Driver

Form the decimal characters 0 9

Each segment is a LED

Normal brightness: 10mA, 2.7V

Page 15: Chapter 1 - MSI Logic Circuits_2013

Exercises

Determines outputs for each case

Inputs DCBA = 1001

Inputs DCBA = 0110

Inputs DCBA = 0011

Inputs DCBA = 0000

D is the most significant bit

Page 16: Chapter 1 - MSI Logic Circuits_2013

7446/7447 BCD-to-7-segment decoder

Page 17: Chapter 1 - MSI Logic Circuits_2013

7446/7447 truth table

Page 18: Chapter 1 - MSI Logic Circuits_2013

Problem 2

Implement 7446/7447 by logic gates

Page 19: Chapter 1 - MSI Logic Circuits_2013

Encoder

The opposite of decoding process

Depend on the context, terms encoder and decoder are interchangeable

2N-line-to-N-line encoder

2N inputs

Only one input is activated at a given time

Produces a N-bit binary code

Page 20: Chapter 1 - MSI Logic Circuits_2013

8-to-3 encoder

A7 A6 A5 A4 A3 A2 A1 A0 O2 O1 O0

1 1 1 1 1 1 1 0 0 0 0

1 1 1 1 1 1 0 1 0 0 1

1 1 1 1 1 0 1 1

1 1 1 1 0 1 1 1

1 1 1 0 1 1 1 1

1 1 0 1 1 1 1 1

1 0 1 1 1 1 1 1

0 1 1 1 1 1 1 1

Page 21: Chapter 1 - MSI Logic Circuits_2013

8-to-line encoder

More than one inputs are activated?

Page 22: Chapter 1 - MSI Logic Circuits_2013

74147 Decimal-to-BCD Priority Encoder

More than one input is activated, output code respond to the highest-numbered input

Exp: A6, A2, A0 are activated output code is 110 (6)

Page 23: Chapter 1 - MSI Logic Circuits_2013

Exercises

Determine outputs of 74147 if A9-A0

inputs are

1110111111

All high except A , A , AAll high except A7, A5, A3

All low except A9, A1, A0

Page 24: Chapter 1 - MSI Logic Circuits_2013

Example – Switch encoder

Page 25: Chapter 1 - MSI Logic Circuits_2013

Example

3 groups

Each group stores code of pressed key

Page 26: Chapter 1 - MSI Logic Circuits_2013

Magnitude comparator

Compare two input binary quantities

Generate outputs to indicate which one is greater

Page 27: Chapter 1 - MSI Logic Circuits_2013

7485 truth table

Page 28: Chapter 1 - MSI Logic Circuits_2013

Exercise

Page 29: Chapter 1 - MSI Logic Circuits_2013

Problem 3

Implement the comparator by logic gates

Page 30: Chapter 1 - MSI Logic Circuits_2013

8-bit magnitude comparator

12, 16 … bit comparator ?

Page 31: Chapter 1 - MSI Logic Circuits_2013

Exercise

Describe operation of the 8-bit comparator for the following cases

A7A6A5A4A3A2A1A0 = 10101111 B7B6B5B4B3B2B1B0 = 10110001

A7A6A5A4A3A2A1A0 = 10101111 B7B6B5B4B3B2B1B0 = 10101111

A7A6A5A4A3A2A1A0 = 10101111 B7B6B5B4B3B2B1B0 = 10101001

Page 32: Chapter 1 - MSI Logic Circuits_2013

Application example

Page 33: Chapter 1 - MSI Logic Circuits_2013

Code converter

Change data presented in one type of binary code to another type of binary code

BCD-to-7-segment BCD-to-7-segment

BCD to binary

Binary to BCD

Binary to Gray code

Gray code to binary

Page 34: Chapter 1 - MSI Logic Circuits_2013

Content

Encoder / Decoder

Data busing

Multiplexer / Demultiplexer

Page 35: Chapter 1 - MSI Logic Circuits_2013

Multiplexers (MUX - Data Selectors)

Select one inputs to pass on to the output

Desired input is controlled by SELECT inputs

Page 36: Chapter 1 - MSI Logic Circuits_2013

Two-input multiplexer

S I1 I0 Z

0 0 0 00 0 1

0 1 0

Z = I0S’ + I1S

0 1 1

1 0 0

1 0 1

1 1 0 11 1 1

Page 37: Chapter 1 - MSI Logic Circuits_2013

Four-input multiplexer

Page 38: Chapter 1 - MSI Logic Circuits_2013

Problem 4

Implement eight-input multiplexer with enable signal (74151)

Page 39: Chapter 1 - MSI Logic Circuits_2013

Sixteen-input multiplexer

Page 40: Chapter 1 - MSI Logic Circuits_2013

Quad Two-Input MUX (74157)

Page 41: Chapter 1 - MSI Logic Circuits_2013

Application – Data routing

select = 0select = 1

Page 42: Chapter 1 - MSI Logic Circuits_2013

Applications – Parallel to serial

Page 43: Chapter 1 - MSI Logic Circuits_2013

Applications – Logic function generation

Problem 5: combine Enable signal to generate 4-input logic functions

Select : input variables

Data : connect 0 or 1 (based on truth table)

Page 44: Chapter 1 - MSI Logic Circuits_2013

Example – Control system

CreativityCreativityCreativityCreativity

Page 45: Chapter 1 - MSI Logic Circuits_2013

Demultiplexers (Data distributor)

Revert of MUX

Page 46: Chapter 1 - MSI Logic Circuits_2013

1-to-4 demultiplexer

S1 S0 I O3 O2 O1 O0

0 0 0 0 0 0 0

0 0 1 0 0 0 1

0 1 0

1-to-4DEMUX1-to-4

DEMUX

I

O3

O2

O1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

DEMUXDEMUX

S1 S0

O0

Page 47: Chapter 1 - MSI Logic Circuits_2013

1-to-8 demultiplexer

Page 48: Chapter 1 - MSI Logic Circuits_2013

DEMUX vs. 1-to-N decoder

Page 49: Chapter 1 - MSI Logic Circuits_2013

Application – Synchronous data transmission

Page 50: Chapter 1 - MSI Logic Circuits_2013

Waveform

Page 51: Chapter 1 - MSI Logic Circuits_2013

Real application examples

Page 52: Chapter 1 - MSI Logic Circuits_2013

Content

Encoder / Decoder

Data busingMultiplexer /

Demultiplexer

Page 53: Chapter 1 - MSI Logic Circuits_2013

Bus ?

Page 54: Chapter 1 - MSI Logic Circuits_2013

Bus ?

Common connecting lines for data transferring

Many devices connect their inputs/outputs

Device 0Device 0 Device 1Device 1 Device 2Device 2

Device 3Device 3 Device 4Device 4

Data bus

Page 55: Chapter 1 - MSI Logic Circuits_2013
Page 56: Chapter 1 - MSI Logic Circuits_2013
Page 57: Chapter 1 - MSI Logic Circuits_2013
Page 58: Chapter 1 - MSI Logic Circuits_2013
Page 59: Chapter 1 - MSI Logic Circuits_2013

Open collector

Page 60: Chapter 1 - MSI Logic Circuits_2013
Page 61: Chapter 1 - MSI Logic Circuits_2013

74173 circuit

Page 62: Chapter 1 - MSI Logic Circuits_2013

Example

Page 63: Chapter 1 - MSI Logic Circuits_2013

Signal sequence

t1: reg. A outputs are enabled

t2: reg. C inputs data

t3: reg. A outputs are disabled, data bus return to Hi-Z state

Page 64: Chapter 1 - MSI Logic Circuits_2013

Expanding bus size

Page 65: Chapter 1 - MSI Logic Circuits_2013

Bus representation

Page 66: Chapter 1 - MSI Logic Circuits_2013

Bidirectional busing

Page 67: Chapter 1 - MSI Logic Circuits_2013
Page 68: Chapter 1 - MSI Logic Circuits_2013
Page 69: Chapter 1 - MSI Logic Circuits_2013
Page 70: Chapter 1 - MSI Logic Circuits_2013

Review questions

Can more than one decoder output be active at one time?

What is the function of a decoder’s enable input?

Which LED segments will be on for a 7-segment decoder input of 1001?Which LED segments will be on for a 7-segment decoder input of 1001?

How does a priority encoder differ from an ordinary encoder?

What are the functions of a multiplexer ?

What are some major applications of a multiplexer?

Page 71: Chapter 1 - MSI Logic Circuits_2013

Problems

1 3 4 5 (7 40) 8 9

13 14 15 16

27 29 30 31 (33 34) 35 36 37

38 (all students)

39 41 43 44

45*

56 57 58 59 60 61 62

Page 72: Chapter 1 - MSI Logic Circuits_2013

Examiner

Each group must solve all the problems

Write down the problems and solutions

Other group will comment