Electronic – How to drive a cd4051 analog mux with buttons as channel selector

multiplexer

I 'd like to control an analog multiplexer cd4051 as a 8-1 switch with buttons that will act as channel selector (1-8)
I know how to do it with Arduino but is there any other way to read the state of 8 buttons and provide a 3 bit word as separate digital signals?

Best Answer

If you want to do it with momentary switches you could do it with a couple of IC packages (flip-flops or cross-coupled gates) to have a 3-bit S-R latch, and then drive the latches on and off with diodes or gates such that pressing any switch will force the 3-bit output to the desired state.

You would need 6 resistors total and 3 diodes per switch, for a total of 24 diodes, or you could use 6 8-input NAND gates cross-coupled and 8 resistors (and no diodes).

Eg. (about 1/3 of circuit partially shown)

schematic

simulate this circuit – Schematic created using CircuitLab