4-to-16 line decoder

I'm in a digital logic class and am having a bit of a problem figuring out a problem. I'm not looking for an answer, per se, but would greatly appreciate any good advice or links that will help me understand how to piece everything together. The question calls for making a 4-to-16 line decoder from five 2-to-4 line decoders. The book we are using is terrible.

Thanks.

Mike

Reply to
Mike
Loading thread data ...

You'll need four decoders for the 16 outputs.

Hint: they probably have another input, beyond the 2 select input lines.

Reply to
Spehro Pefhany

Initially that was my thinking, but I'm not sure where the fifth decoder comes into play. I neglected to mention that the problem needs to include an enable, so maybe that's where. As far as principles go, I understand what they do and that they're "chained" together, but it's the "chaining" together that has me lost.

Mike

Reply to
Mike

Mike,

Assuming your 2-to-4 line decoders have output enables, you should be able to cascade them. Take a look at the data sheet for the 74XX139. Connect one of the decoders to two address bits with its enable pulled low and connect its four outputs to the enables of four cascaded 2-to-4 line decoders with their address bits all connected to the other two address lines.

--
James T. White
Reply to
James T. White

or put another way, 4 decoders to decode to outputs and 1 decoder to decode which output decoder to enable

Cheers

PeteS

Reply to
PeteS

---

+-----+ | Y1|------------->OUT1 +------|A0 Y2|------------->OUT2 | +----|A1 Y3|------------->OUT3 | | +--|E Y4|------------->OUT4 | | | +-----+ | | +-----------------+ | | +-----+ | | | | Y1|--------|---->OUT5 +-|----|A0 Y2|--------|---->OUT6 | +----|A1 Y3|--------|---->OUT7 | | +--|E Y4|--------|---->OUT8 | | | +-----+ | | | +---------------+ | | | +-----+ | | | | | Y1|------|-|---->OUT9 +-|----|A0 Y2|------|-|---->OUT10 | +----|AI Y3|------|-|---->OUT11 | | +--|E Y4|------|-|---->OUT12 | | | +-----+ | | | | +-------------+ | | | | +-----+ | | | | | | Y1|----|-|-|---->OUT13 IN1>---------------+-|----|A0 Y2|----|-|-|---->OUT14 IN2>-----------------+----|A1 Y3|----|-|-|---->OUT15 +--|E Y4|----|-|-|---->OUT16 | +-----+ | | | +-----------+ | | | +-----+ | | | | | Y4|--+ | | | IN3>----------------------|A0 Y3|----+ | | IN4>----------------------|AI Y2|------+ | Vcc ---|E Y1|--------+ +-----+

-- John Fields Professional Circuit Designer

Reply to
John Fields

Thanks, John... that looks like a great schematic, but I guess I was hoping to learn more about how to come up with a solution.

Mike

Reply to
Mike

I'm more looking for theory on decoder design, not how to put together a specific decoder. Kinda like teaching a man how to fish rather than giving him one.

Mike

Reply to
Mike

--
Well, it looked like you were still having trouble after all the
explanations, so I figured I\'d just give it to you.  Is it clear
yet?  ;)
Reply to
John Fields

I think the key here is "cascading".

Think of a computer address bus with N bits (i.e. N inputs to your decoder). In a computer, the highest bits are decoded to provide chip selects to RAM, ROM, peripherals, etc. Each of these, in turn, decodes the highest of their bits to address components, memory chips, etc. Those cells in turn decode their bits to access individual memory locations, registers, etc.

At each step, the topmost X bits are decoded, and the remaining N-X bits are passed along to the next component. That component decodes Y bits, passing along N-X-Y bits to the next stage. Etc.

Reply to
DJ Delorie

Thanks, that helps. :)

Reply to
Mike

I actually printed out your diagram and am working from that. I have written out a truth table to produce all possible 16 minterms (D0-D15). I noticed some patterns in the truth table (specifically, how minterms D8-D15 are produced only when IN4 is high). Guess I just need to learn how to dissect the truth table better to come up with the digram :)

Thanks again for your schematic. It's a great help. I shouldn't be banging my head against the wall too much longer now ... :)

Mike

Reply to
Mike

Agreed. I'm starting to realize a pattern in the truth table, but unfortunately our course doesn't include it. Guess I can experiment myself :) Thanks.

Mike

Reply to
Mike

Mike,

You can write the logic eqauations for each decoder output and design a circuit to implement it using ANDs, ORs and Inverters. For example:

OUT1 = !ADR1 * !ADR2 * !ADR3 * !ADR4

...

OUT16 = ADR1 * ADR2 * ADR3 * ADR4

If you do it this way, there are a couple of things to keep in mind. First, you can often simplify things by using DeMorgans theorm and second, that certain blocks appear over and over. One example of that is a 2-line -to- 4-line decoder. By using these as "builing-blocks" just like simple ANDs, ORs and Inverters, your circuit can further simplified by replacing some or all of it.

The next level of integration would be to consider doing this in a GAL, CPLD or FPGA using the logic equations more or less directly.

Was this more what you had in mind?

--
James T. White
Reply to
James T. White

If you were using programmable logic there would likley be a teachable process to get to the results you want from the requirements (either minimizing logic gates, minimizing input-output delay or something else), but here you are given a bunch of pegs and have to figure out how to fit them into the given holes-- I don't think there is a formal method, just experience and pattern matching type intelligence.

Reply to
Spehro Pefhany

That make sense. At the lowest level of the design hierarchy, I could use basic gates to implement, but I think our prof. just wants a diagram (similar to what John provided) abstracted at the decoder level.

All of this seems to make sense now. Thanks to all for the help... greatly appreciate it!

Mike

Reply to
Mike

Meant to say that our course doesn't include study on PLA, not on actual truth tables :) Guess that would be a bad thing ;)

Mike

Reply to
Mike

John put all the decoders in line vertically, in order to fit the schematic in the screen width. It would be easier to see the thought behind the design if the bottom decoder was drawn to the left of the other four, and vertically between the second and third decoders.

--
Peter Bennett VE7CEI 
email: peterbb4 (at) interchange.ubc.ca        
GPS and NMEA info and programs: http://vancouver-webpages.com/peter/index.html 
Newsgroup new user info: http://vancouver-webpages.com/nnq
Reply to
Peter Bennett

Think "hierarchy", or maybe "tree". ;-)

It took me about four seconds to come up with the answer, so I'm not going to tell you because you'd miss out on that "ah-HA!" moment. ;-)

Have Fun! Rich

Reply to
Rich Grise

On Thu, 23 Feb 2006 08:45:34 -0500, Mike top-posted:

Don't chain them - do it sideways. ;-)

Good Luck! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.