250 likes | 446 Views
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.
E N D
ENGR/ECE 21221 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, 2n outputs • 2-to-4, 3-to-8, 4-to-16, etc. • with a few enable inputs
Note “x” (don’t care) notation. Binary 2-to-4 decoder
MSI 2-to-4 decoder • Input buffering (less load) • NAND gates (faster)
Decoder cascading 4-to-16 decoder
More cascading 5-to-32 decoder
ABEL / PAL Version of 74x138 module 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;
ABEL decoder program (continued equations Y0 = 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
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
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
Decoder Encoder Encoders vs. Decoders
74x148 8-input priority encoder • Active-low I/O • Enable Input • “Got Something” • Enable Output
Cascading priority encoders • 32-inputpriority encoder
Some encoder datasheets • 74x148 • 8-line to 3-line priority encoders • 74x147 • 10-line to 4-line priority encoders
Some multiplexer datasheets • 74x151 • 8-Input Multiplexer • 74x153 • Dual 4-Input Multiplexer • 74x157, 74x158 • Quad 2-Input Multiplexer