Decoders
Objectives
We would like to :
- Discuss decoders
Notes
- This is Carpinelli, chatper 4
- Decoder can have several meanings in this area
- A decoder is a n input, 2n output device
- A BCD to decimal decoder/driver is a circut designed to take some input and drive another device, like the 74x48 BCD to 7-segment decoder/driver
- We learned (somewhat) how to build the second.
- We need to learn about the first.
-
- Sometimes we have an enable (or enable not) line as well.
- What would we use this for?
- Rmember in the register discussion, we might have a bank of registers.
- Let's build a Register File
- Each register is 8 bits.
- We have four registers.
- We have a common clock.
- We will use a decoder to select the register
- The input to the decoder will be the "address" of the register we want to write to.
- This will probably come from the instruction.
-
- Note, this is only 1/2 of the register file
- We also need to control what register is being output, but we need a mulitplexor (mux) for that.
- Carpinelli has an interesting discussion on how we can build a n bit decoder out of multiple smaller decoders.
- Here is the idea:
- Use a decoder "up front" to select a bank of decoders
-
- A tri-state device, sometimes called a driver
- One input
- One output
- One control line
- If the control line is high, the input data is passed to the output data
- If the control line is low, no data is passed to the output.
-
- In digital, I can buld my own components
- file -> new embedded circuit
- Create the circuit with input and output elements
- Make sure you label all of the input/output elements
- Save this
- It will now be available in the "Custom" section
- More on this later.
-
- So my version of Carpinelli's circuit:
- The 74x238 is an 3 input, 8 output decoder
- It has two enalble not (GA, GB lines and an enable (G) line.
- It has data input lines A,B,C
- It has eight (Y0 - Y7) output lines.
-
- Data Sheet.
- Note the 74x138 provides inverted output.
- Too late, I probably made a mistake using a tri-state device
- Replace that with an and gate in class.
- Tri-states will have NO OUTPUT,
- but we want either a 0 or a 1
- And will accomplish this.
- Decoder examples, but you need this file too.