# Input Rerouting using IC or Transistor Application

I'm quite new to Electronics and I have this assignment I have to do - I need to "reroute" the input according to his type.

I have these two inputs, which can be both analog (1 channel, same value on both inputs) or digital (2 channels, different value in every input). I also have this Control input which is given to me, and I can detect whether the input is Analog or Digital (5v - analog. 0v - digital).

I added two schemes that shows how it should reroute the inputs:

• if the input is Analog, it should reroute it to the Analog input A0 (of the Arduino in my case).
• If the input is Digital, it should reroute it to Digital Input D0 and D1 (of the Arduino in my case).

Case Analog:

Case Digital:

I know I can do it using an Arduino, but I'm looking for something cheaper and smaller to do this, and I don't want my main Arduino to handle this. Is there any IC that does this kind of jobs? If not - how can I do it using transistors?

• Why not let the Arduino handle it? The A0/A1 pins can also be read as digital signals. It's no more effort to read the same pins in different ways, as it is to read different pins. Mar 11, 2016 at 14:29
• I should point out that the analog pins on the Arduino can also handle digital input, so it seems unnecessarily complicated to reroute the signal to a different input pin. Still, if that is what the assignment says ... Mar 11, 2016 at 23:30
• Also D0 and D1 are generally used for serial communications, so this program may not succesfully do Serial.print while you have wires running to other devices. Mar 11, 2016 at 23:31