unit08 (1)

34
 EET 1131 Unit 8 Code Converters, Multiplexers, and Demultiplexers Re ad Kleitz, Chapter 8, skipping Sections 8-2 and 8-4. Homework #8 and a! #8 d"e in a week and a hal. $"iz when Homework #8 is d"e.

Upload: johnsamvlb

Post on 06-Feb-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 1/34

EET 1131 Unit 8 

Code Converters, Multiplexers, and

Demultiplexers

Read Kleitz, Chapter 8, skippingSections 8-2 and 8-4.

Homework #8 and a! #8 d"e in aweek and a hal.

$"iz when Homework #8 is d"e.

Page 2: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 2/34

Types of Chips

Here are the kinds o chips we%ll st"d& in thecoming weeks' Comparators

(ecoders )ncoders Chapter 8

Code con*erters

+"ltipleers

(em"ltipleers lip-lops Chapter /

Co"nters Chapter 2

Shit registers  Chapter 0

+"lti*i!rators 

Chapter 4

Page 3: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 3/34

Types of Chips (Continued)

or each t&pe o chip listed on pre*io"s slide,&o" sho"ld "nderstand'

. 1hat that t&pe o chip does, and wh& it%s

"se"l.2. How &o" co"ld !"ild s"ch a circ"it o"t o gates.

0. Speciic details o act"al chips in eachcategor&.

Page 4: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 4/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

$o%parators

&#e 'unction o' a co%parator is to co%pare t#e %a"nitudes o' t(o

 )inar* nu%)ers to deter%ine t#e relations#ip )et(een t#e% +n t#e

si%plest 'or%, a co%parator can test 'or eualit* usin" -N.R "ates

Example

Solution

/o( could *ou test t(o 4)it nu%)ers 'or eualit*1

!N t#e outputs o' 'our -N.R "ates

 A1

B1

 A2

B2

 A3

B3

 A4

B4

.utput

Page 5: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 5/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

$o%parators

+$ co%parators provide outputs to indicate (#ic# o' t#e input

nu%)ers is lar"er or i' t#e* are eual $ascadin" inputs are provided

to e3pand t#e co%parator to lar"er nu%)ers

.utputs

 A1

 A0

 A2

 A3

B1

B0

B2

B3

$ascadin"

inputs

$.P

 A = B

 A < B

 A > B

 A = B

 A < B

 A > B

0

0

 A

 B &#e +$ s#o(n is t#e

4)it 7485

Page 6: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 6/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

$o%parators

+$ co%parators can )e e3panded usin" t#e cascadin" inputs as

s#o(n &#e lo(est order co%parator #as a /+6/ on t#e A = B input

.utputs

 A1

 A0

 A2

 A3

B1

B0

B2

B3

$.P

 A = B

 A < B

 A > B

 A = B

 A < B

 A > B

0

0

 A

 B

 A

 A4

 A!

 A"

B

B4

B!

B"

50

$.P

 A = B

 A < B

 A > B

 A = B

 A < B

 A > B

0

0

 A

 B

S:s S:s

Page 7: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 7/34

Comparator Chip

483 o"r-!it magnit"de comparator

Page 8: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 8/34

#na$le %ins

+an& o the chips we%ll st"d& ha*e ena!leinp"ts. (epending on the logic le*el at thispin, the chip is either enabled or disabled.

1hen the chip is ena!led, it perorms itsintended "nction and the o"tp"ts !eha*e as&o" wo"ld epect.

1hen the chip is disa!led, then "s"all&5 all

o"tp"ts are orced to their inacti*e state,regardless o the other inp"ts to the chip. Common names or ena!le pins incl"de )6,

7 or gate95, and CS or chip select95.

Page 9: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 9/34

 &'tivei*h versus &'tive+o %ins

)ach inp"t pin and o"tp"t pin on a chip iseither acti*e-high or acti*e-low.

:n a logic s&m!ol' ;cti*e-low pins are marked with a !"!!le or

triangle. ;cti*e-high pins ha*e no !"!!le or triangle.

;cti*e-high pins' the pin is acti*e when

there%s a H:7H on that pin. +an& chips ha*e acti*e-low pins' the pin is

acti*e when there%s a <1 on that pin.

Page 10: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 10/34

#xample- "414 De'oder 

  rom lo&d, p. 0/= rom >eas :nstr"ment datasheet

Page 11: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 11/34

De'oders, #n'oders, . Code Converters

Decoders con*ert a !inar& code intoa single acti*e o"tp"t representing thecode%s *al"e.

Encoders generate a coded o"tp"trom a single acti*e inp"t line.

Code converters take one inp"t code

s"ch as ?C(5 and con*ert it toanother code s"ch as !inar&5.

Page 12: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 12/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

ecoders

! decoder is a lo"ic circuit t#at detects t#e presence o' a speci'ic

co%)ination o' )its at its input &(o si%ple decoders t#at detect t#e

 presence o' t#e )inar* code 00;; are s#o(n &#e 'irst #as an active

/+6/ output< t#e second #as an active .= output

 A1

 A0

 A2

 A3

 X 

!ctive /+6/ decoder 'or 00;;

 A1

 A0

 A2

 A3

 X 

!ctive .= decoder 'or 00;;

Page 13: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 13/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

ecoders

!ssu%e t#e output o' t#e decoder s#o(n is a

lo"ic ; =#at are t#e inputs to t#e decoder1Question

 A0 = 0

 A1 = 1

 A2 = 0

 A3 = 1

1

Page 14: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 14/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

ecoders

+$ decoders #ave %ultiple outputs to decode an*

co%)ination o' inputs >or e3a%ple t#e #e3 decoder

s#o(n #ere #as ;? outputs @ one 'or eac# co%)ination o'

 )inar* inputs

Question >or t#e input s#o(n,

(#at is t#e output1

Bin/Dec

 A0

0123456789

101112131415

4-bit binary

input

Decimaloutputs

 A1

 A2

 A3

;

;

0

;;;;;;;;;;;0;;;;

;

Page 15: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 15/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

ecoders

! speci'ic inte"rated circuit

decoder is t#e 74;54, a 4to;?

decoder +t includes t(o active

.= c#ip select lines (#ic# %ust

 )e at t#e active level to ena)le t#e

outputs &#ese lines can )e used to

e3pand t#e decoder to lar"er inputs

 

CS 2

 A1

 A0

 A2

 A3

CS 1

-AB

 EN 

74;54

1

12

13

14

1

2

3

4

/

10

11

!"

0

.

4

12

Page 16: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 16/34

'tal De'oder 

0 data inp"t pins or inp"t code. 8 o"tp"t pins.

;lso called 1-of-8 decoder or3-line-to-8-line decoder.

+a& ha*e other inp"ts and o"tp"tstoo, s"ch as ena!le inp"ts.

)ample chip' 408

Page 17: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 17/34

ex De'oder 

4 data inp"t pins or inp"t code. = o"tp"t pins.

;lso called 1-of-16 decoder or4-line-to-16-line decoder.

+a& ha*e other inp"ts and o"tp"tstoo, s"ch as ena!le inp"ts.

)ample chip' 434

Page 18: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 18/34

CD De'oder 

4 data inp"t pins or inp"t code. / o"tp"t pins.

;lso called 1-of-10 decoder or4-line-to-10-line decoder.

+a& ha*e other inp"ts and o"tp"tstoo, s"ch as ena!le inp"ts.

)ample chip' 4S42

Page 19: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 19/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

Encoders

!n encoder accepts an active lo"ic level on one o' its

inputs and converts it to a coded output, suc# as :$ or

 )inar*

&#e )asic lo"ic dia"ra% is s#o(n&#is encoder #as an input 'or eac#

deci%al di"it, and 'our outputs t#at

represent t#e )inar* code 'or t#e

active input di"it

&#ere is no Cero input )ecause t#e

outputs are all .= (#en t#e input

is Cero

 A1

 A0

 A2

 A3

;

2

45?7

8

9

Page 20: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 20/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

Encoders

 A1

 A0

 A2

 A3

Example

Solution

S#o( #o( t#e :$ encoder converts t#e deci%al

nu%)er into a :$ 00;;

&#e top t(o .R "ates #ave ones as indicated (it#

t#e red lines &#us t#e output is 00;;

;

2

45?7

8

9

0

0

0

0

0

0

0

0

;

0

0

;

;

Page 21: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 21/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

Encoders

&#e 74;47 is an e3a%ple o' an +$ encoder +t is #as ten

active.= inputs and converts t#e active input to an

active.= :$ output

&#is device o''ers additional'le3i)ilit* in t#at it is a priority

encoder &#is %eans t#at i' %ore

t#an one input is active, t#e one

(it# t#e #i"#est order deci%al

di"it (ill )e active

eci%al

input

:$

output

6N

V CC 

/PR+A:$

74/$;47

&#e ne3t slide s#o(s an application D

1

2

4

(1!)

(11)

(12)

(13)

(1)

(2)

(4)

(3)

()

(/)

(")

(!)

(14)

()

1

2

3

4

!

"

(10)

/

Page 22: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 22/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

Encoders

V CC 

:$ co%ple%ent o'

e* press

Fe*)oard

encoder  /PR+A:$

74/$;47

&#e Cero line is not needed )* t#e

encoder, )ut %a* )e used )* ot#er

circuits to detect a e* press

1234

!"/

124

/"

!

321

0

4

 R"

 R

 R/

 R4  R  R!

 R1  R2  R3

 R0

Page 23: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 23/34

CD #n'oder 

/ inp"t pins. 4 o"tp"t pins or o"tp"t code.

;lso called 10-line-to-4-lineencoder.

+a& ha*e other inp"ts and o"tp"tstoo, s"ch as ena!le inp"ts.

)ample chip' 44

Page 24: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 24/34

'tal #n'oder 

8 inp"t pins. 0 o"tp"t pins or o"tp"t code.

;lso called 8-line-to-3-line encoder. +a& ha*e other inp"ts and o"tp"ts

too, s"ch as ena!le inp"ts.

)ample chip' 448

Page 25: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 25/34

Different umeri' Codes

Se*eral dierent codes eist or "sings and /s to represent positi*e

integers. Standard !inar& code

)ample' :n standard !inar&, 3 is .

?inar&-coded decimal ?C(5 )ample' :n ?C(, 3 is /// //.

7ra& code )ample' :n 7ra& code, 3 is ///.

Page 26: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 26/34

ourit 5ray Code

>he ke& eat"reo 7ra& code isthat onl& one !it

changes whenwe increase an"m!er !& one.

>his is not tr"eo standard!inar&.

Page 27: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 27/34

6hy is 5ray Code 7seful8

7ra& code is "sed or rotar& encodersthat sense the ang"lar position o ashat or ale.

rom 1ikipedia article on rotar& encoders' 

9tandard 3$it $inary 'ode- no *ood: 3$it 5ray 'ode- $etter:

Page 28: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 28/34

Page 29: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 29/34

5ray Code;inary Converters

i*ure 40< inaryto5ray'ode 'onverter i*ure 41< 5ray'odeto$inary 'onverter 

Page 30: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 30/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

! %ultiple3er GU-H selects one data line 'ro% t(o or

%ore input lines and routes data 'ro% t#e selected line to

t#e output &#e particular data line t#at is selected is

deter%ined )* t#e select inputs

ultiple3ers

&(o select lines are s#o(n

#ere to c#oose an* o' t#e

'our data inputs

Select

inputs

ata

inputs

ata

outputD1

D0

D2

D3

S 1

S 0

Question=#ic# data line is selected

i' S ;S 0 I ;01 D2 

;

0M7=

1

2

0

3

1

0

Page 32: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 32/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

! de%ultiple3er GEU-H per'or%s t#e opposite 'unction

'ro% a U- +t s(itc#es data 'ro% one input line to t(o or

%ore data lines dependin" on t#e select inputs

&#e 74S;8 (as introduced

 previousl* as a decoder )ut can also

serve as a EU- =#en

connected as a EU-, data is

applied to one o' t#e ena)le inputs,

and routed to t#e selected output

line dependin" on t#e selectvaria)les Note t#at t#e outputs are

active.= as illustrated in t#e

'ollo(in" e3a%pleD

e%ultiple3ers

74S;8

ata

select

lines

Ena)le

inputs

ata

outputs

Y 1

Y 2

Y 3

Y 4

Y !

Y "

Y 0D#M7=

 A

 A

 A

0

1

2

G

GG

1

2&

2

Page 33: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 33/34

© 2009 Pearson Education, Upper Saddle River, NJ 07458 !ll Ri"#ts Reserved

eter%ine t#e outputs, "iven t#e

inputs s#o(n

e%ultiple3ers

Example

74S;8

ata

select

lines

Ena)le

inputs

ata

outputs

 A0

Y 0

Y ;

Y 2

Y 4

Y 5

Y ?

Y 7

 A;

 A2

G;

G2!

G2:

.=

.=&#e output lo"ic is opposite to t#e input

 )ecause o' t#e active.= convention GRed 

s#o(s t#e selected lineH

Solution

Y 1

Y 2

Y 3

Y 4

Y !

Y "

Y 0

D#M7=

 A

 A

 A

0

1

2

G

G

G

1

2&

2

Page 34: unit08 (1)

7/21/2019 unit08 (1)

http://slidepdf.com/reader/full/unit08-1 34/34

9ome Demultiplexer Chips

408 0-line to 8-line (ecoder()+@A5

434 4-line to =-line (ecoder()+@A5

40D d"al 2-line to 4-line (ecoder()+@A5