Post History
You are trying to have a single digital line that can only be either high or low express three states. That's not going to work. You have a total of 13 output states you want to select between (o...
#2: Post edited
- You are trying to have a single digital line that can only be either high or low express three states. That's not going to work.
- You have a total of 13 output states you want to select between (one of 12 analog signals, and high impedance). That requires a minimum of 4 digital signals one way or another, since 3 signals can only express 8 different states.
- One way to use the four digital control signals is as four address lines. Since the firmware is driving the address lines, the mapping of the 0-15 address to the output state can be arbitrary.
- If you connect the low three address lines ADR2-ADR0 to the address inputs of the 8:1 mux, and ADR3 to its enable, then that mux will only respond to addresses 8-15. Its output will be high impedance for addresses 0-7.
- For the 4:1 mux connect ADR1-ADR0 to its address inputs, and the NOR of ADR3 ad ADR2 to its enable. That means it will only respond to addresses 0-3.
- With the above scheme, addresses 4-7 will cause the overall output to be high impedance. Pull ups and downs on the two high address lines will guarantee high impedance unless the address lines are explicitly driven.
As stated earlier, you'll need a minimum of 4 digital outputs from your processor. If you can afford one more digital output, then you can get rid of the logic gate to make the 4:1 mux enable signal and drive both enables directly from the micro instead. That simplifies things, and leaves the control completely to the firmware. This is what I would do unless there really only are 4 digital outputs available for this task.
- You are trying to have a single digital line that can only be either high or low express three states. That's not going to work.
- You have a total of 13 output states you want to select between (one of 12 analog signals, and high impedance). That requires a minimum of 4 digital signals one way or another, since 3 signals can only express 8 different states.
- One way to use the four digital control signals is as four address lines. Since the firmware is driving the address lines, the mapping of the 0-15 address to the output state can be arbitrary.
- If you connect the low three address lines ADR2-ADR0 to the address inputs of the 8:1 mux, and ADR3 to its enable, then that mux will only respond to addresses 8-15. Its output will be high impedance for addresses 0-7.
- For the 4:1 mux connect ADR1-ADR0 to its address inputs, and the NOR of ADR3 ad ADR2 to its enable. That means it will only respond to addresses 0-3.
- With the above scheme, addresses 4-7 will cause the overall output to be high impedance. Pull ups and downs on the two high address lines will guarantee high impedance unless the address lines are explicitly driven.
- As stated earlier, you'll need a minimum of 4 digital outputs from your processor. If you can afford one more digital output, then you can get rid of the logic gate to make the 4:1 mux enable signal and drive both enables directly from the micro instead. That simplifies things, and leaves the control completely to the firmware. This is what I would do unless there really are only 4 digital outputs available for this task.
- <blockquote> I am not trying to encode 13 output states using a single digital line.</blockquote>
- Right. Like I said, you are trying to encode 3 states with your single digital line WE_MUX_EN. Those states are mux 1 enabled, mux 2 enabled, and neither mux enabled.
- <blockquote>My requirement is simply mutual exclusion between two multiplexers</blockquote>
- If you read my answer more carefully, you will see that's exactly what it gets you. With the 4-wire solution, addresses 8-15 select mux 1, 0-3 select mux 2, and the remaining addresses 4-7 select neither. With the 5-wire solution, you have explicit control over enabling each mux independently.
- <blockquote>That is why I am using the same address lines and a single control signal (with inversion) for the enable pins—not to increase the number of selectable states, but only to choose which MUX is active.</blockquote>
- By thinking of the problem that way, you get into the confusion that caused you to ask the question. I show a different way of thinking of the overall problem such that simpler solutions are more apparent. In the 4-wire option (same number of control lines as yours), only a single NOR gate is needed. The 5-wire option uses one more control line, but requires no additional logic.
#1: Initial revision
You are trying to have a single digital line that can only be either high or low express three states. That's not going to work. You have a total of 13 output states you want to select between (one of 12 analog signals, and high impedance). That requires a minimum of 4 digital signals one way or another, since 3 signals can only express 8 different states. One way to use the four digital control signals is as four address lines. Since the firmware is driving the address lines, the mapping of the 0-15 address to the output state can be arbitrary. If you connect the low three address lines ADR2-ADR0 to the address inputs of the 8:1 mux, and ADR3 to its enable, then that mux will only respond to addresses 8-15. Its output will be high impedance for addresses 0-7. For the 4:1 mux connect ADR1-ADR0 to its address inputs, and the NOR of ADR3 ad ADR2 to its enable. That means it will only respond to addresses 0-3. With the above scheme, addresses 4-7 will cause the overall output to be high impedance. Pull ups and downs on the two high address lines will guarantee high impedance unless the address lines are explicitly driven. As stated earlier, you'll need a minimum of 4 digital outputs from your processor. If you can afford one more digital output, then you can get rid of the logic gate to make the 4:1 mux enable signal and drive both enables directly from the micro instead. That simplifies things, and leaves the control completely to the firmware. This is what I would do unless there really only are 4 digital outputs available for this task.
