ENGR/ECE 212 21 February, 2003

24
1 ENGR/ECE 212 21 February, 2003 All slides except those with blue backgrounds are taken from John Wakerly’s Stanford EE 121, Digital Design Laboratory

description

ENGR/ECE 212 21 February, 2003. All slides except those with blue backgrounds are taken from John Wakerly’s Stanford EE 121, Digital Design Laboratory. Decoders. General decoder structure Typically n inputs, 2 n outputs 2-to-4, 3-to-8, 4-to-16, etc. with a few enable inputs. - PowerPoint PPT Presentation

Transcript of ENGR/ECE 212 21 February, 2003

Page 1: ENGR/ECE 212 21 February, 2003

1

ENGR/ECE 21221 February, 2003

All slides except those with blue backgrounds

are taken from John Wakerly’s

Stanford EE 121, Digital Design Laboratory

Page 2: ENGR/ECE 212 21 February, 2003

2

Decoders• General decoder structure

• Typically n inputs, 2n outputs– 2-to-4, 3-to-8, 4-to-16, etc.– with a few enable inputs

Page 3: ENGR/ECE 212 21 February, 2003

3

Binary 2-to-4 decoder

Note “x” (don’t care) notation.

Page 4: ENGR/ECE 212 21 February, 2003

4

MSI 2-to-4 decoder

• Input buffering (less load)• NAND gates (faster)

Page 5: ENGR/ECE 212 21 February, 2003

5

Decoder Symbol

Page 6: ENGR/ECE 212 21 February, 2003

6

3-to-8 decoder

Page 7: ENGR/ECE 212 21 February, 2003

7

74x138 3-to-8-decoder symbol

Page 8: ENGR/ECE 212 21 February, 2003

8

Decoder cascading

4-to-16 decoder

Page 9: ENGR/ECE 212 21 February, 2003

9

More cascading

5-to-32 decoder

Page 10: ENGR/ECE 212 21 February, 2003

10

ABEL / PAL Version of 74x138module Z74X138

title '74x138 Decoder PLD J. Wakerly, Stanford University‘

"Z74X138 device 'P16L8';

" Input pins

A, B, C, !G2A, !G2B, G1 pin 1, 2, 3, 4, 5, 6;

" Output pins

!Y0, !Y1, !Y2, !Y3 pin 19, 18, 17, 16 istype 'com';

!Y4, !Y5, !Y6, !Y7 pin 15, 14, 13, 12 istype 'com';

" Constant expression

ENB = G1 & G2A & G2B;

Page 11: ENGR/ECE 212 21 February, 2003

11

ABEL decoder program (continuedequationsY0 = ENB & !C & !B & !A; Y1 = ENB & !C & !B & A; Y2 = ENB & !C & B & !A; Y3 = ENB & !C & B & A; Y4 = ENB & C & !B & !A; Y5 = ENB & C & !B & A; Y6 = ENB & C & B & !A; Y7 = ENB & C & B & A;

end Z74X138

Page 12: ENGR/ECE 212 21 February, 2003

12

Decoder applications

• Microprocessor memory systems– selecting different banks of memory

• Microprocessor input/output systems– selecting different devices

• Microprocessor instruction decoding– enabling different functional units

• Memory chips– enabling different rows of memory depending on

address

• Lots of other applications

Page 13: ENGR/ECE 212 21 February, 2003

13

Some decoder datasheets

• 74x138– 3-line to 8-line decoders/demultiplexers

• 74x139– Dual 2-line to 4 line decoders/demultiplexers

• 74x154– 4-to-16 line decoders/demultiplexers

Page 14: ENGR/ECE 212 21 February, 2003

14

Encoders vs. Decoders

Decoder Encoder

Page 15: ENGR/ECE 212 21 February, 2003

15

Binary encoders

Page 16: ENGR/ECE 212 21 February, 2003

16

Need priority in most applications

Page 17: ENGR/ECE 212 21 February, 2003

17

8-input priority encoder

Page 18: ENGR/ECE 212 21 February, 2003

18

74x148 8-input priority encoder

– Active-low I/O– Enable Input– “Got Something”– Enable Output

Page 19: ENGR/ECE 212 21 February, 2003

19

74x148circuit

Page 20: ENGR/ECE 212 21 February, 2003

20

Cascading priority encoders

• 32-inputpriority encoder

Page 21: ENGR/ECE 212 21 February, 2003

21

Some encoder datasheets

• 74x148– 8-line to 3-line priority encoders

• 74x147– 10-line to 4-line priority encoders

Page 22: ENGR/ECE 212 21 February, 2003

22

Multiplexers

Page 23: ENGR/ECE 212 21 February, 2003

23

74x1518-input

multiplexer

Page 24: ENGR/ECE 212 21 February, 2003

24

Some multiplexer datasheets

• 74x151– 8-Input Multiplexer

• 74x153– Dual 4-Input Multiplexer

• 74x157, 74x158– Quad 2-Input Multiplexer