Electronic – arduino – In search of a component or device that switches multiple lines based on input selection

arduinoattinymultiplexerswitches

Okay so the foundation for my curiosity is that in dealing with Arduinos, I found they can be used to program the similar but smaller ATtiny chips. This is the main hookup configuration that some of you may be familiar with if you've done this before.

enter image description here

My problem then is I want to create a shield that sits atop the arduino and has multiple sockets for ATtinys, and a selector switch that allows for choosing which ATtiny is being programmed to.

I actually did make a prototype, and here's what it looks like.

enter image description here

Not the easiest thing to solder!

enter image description here

So it just has a power switch and a simple single pole triple throw. Now I figured the best way to do it was to connect all of them to ground, and let the SPTT choose between which was powered. And in order to make the board as simple as possible, I connected the 4 data lines (3 green and 1 yellow in the picture) straight down and all 3 ATtiny's are connected in parallel to the data, regardless of if they are powered.

Of course this board fails though because I incorrectly assumed there would be no leakage through the ATtiny's data lines, and there is, so the other 2 that aren't being programmed weakly connect through the micro to their respective grounds.

Here's a schematic of it, just pretend it's a SPTT instead of SPDT.

enter image description here

Okay to the point. Effectively what I want is a device that performs this function.
Would this be considered a mux?

enter image description here

Best Answer

I recommend that you use three 4066 analog switches, with the 4 inputs of each chip wired in common with the inputs of the other chips, and the four control lines of each chip tied together and connected to your rotary switch.

enter image description here

Although this requires three chips, they are in a 14-pin DIP package so they are easy to wire up, and each can be selected by a single input (no decode), lending itself to the rotary switch in your diagram.

I have used these same devices (in a SMD package) to switch the four active leads (VCC detect, PGEC, PGED and MCLR) of a PIC programmer, and it works just fine.

The chip has a typical Ron (resistance between the inputs and outputs) of 80 Ω, but that does not seem to affect the operation of the programmer. There are some quad bilateral switches available with a lower Ron, but they are only available in SMT packages.