Multiplexer – Can a Multiplexer Be Used as a Demultiplexer

arduinoledled-matrixmultiplexer

I'm trying to build a musical machine for myself. I've come to a situation where I want to control 8 LEDs using 3 selector pins on my 74151 IC. I've attached the circuit diagram below. Looks like I'll need a Demux instead of a Mux but I don't have any Demux IC on me. Is there a way I can achieve this using the IC 74151?

Circuit Diagram

In this example I've made S0,S1,S2 as high so X7 should glow. But it's not working. Please help me out. Thanks!

Best Answer

The datasheet shows that the 74151 is a digital multiplexer:

enter image description here

In particular, it includes internal logic that buffers one of the inputs as a TTL-level output on the output pin, and as a result, it cannot be used as a demultiplexer. Attempting to apply a low-impedance source to the Y pin may cause damage to the source or the pin's driver.

You will need to use a digital demultiplexer, or an analog mux/switch such as the 4051.