Electronic – How to switch between two analog outputs with a digital output

analogcounterdigital-logicmicrocontroller

I have a circuit with a 74ls93 counter and I want to use one of its outputs to switch between two analog output, i.e., when the output of the counter is HIGH, the output of the circuit must be V1 and when is LOW the output must be V2. V1 and V2 are fixed selected voltages between 0 and 5 V. The output of the circuit (V1 or V2) will be one of the inputs of a microcontroller.

What is the easiest and cheapest way to do this?. I think i need something like an analog multiplexer, but i'm not sure.

Best Answer

Simplest and probably cheapest solution is to use 1/3 of a 74HCT4053, or use a 74HC4053 with a 4.7K pullup resistor on the 74LS output. Connect VEE to GND for this application.

A0 to V2

A1 to V1

AN is the output

S0 is the control input

/E should be grounded (to enable)

Unused inputs S1, S2 should be tied to GND or Vcc, the others can be left floating.