Electronic – arduino – Switch between power and signal with MCU

arduinoeprompowerprogrammersignal

I am trying to make a basic EPROM programmer using an Arduino. It is designed to programme M27c322/160/800 devices.

One problem I am encountering is that these 3 devices have a couple of the pins different. For example, the A20 pin on the 322 is actually the BYTE pin on the 160/800. This means that my Arduino will need to be able to switch this pin between a digital address signal line and a power line that supplies 12V at something like 100mA, depending on which chip is being programmed.

What is the best way to do this?


EDIT 3 – OK so I've had a go at this based on the answers I've already had, does this work as intended?

So basically with the APPLY_A20 line low, the mux just shows a floating pin to the rest of the circuit, allowing me to assert APPLY_12V or APPLY_5V to get power, then if I need to use the A20 address then I pull the APPLY_12V and APPLY_5V lines low and assert APPLY_A20 high.

enter image description here

Best Answer

For a programmer you really need to be able to turn on the various control voltages AND have the ability to isolate the pin for insertion and removal. Also, since there are fingers involved, you also need some ESD protection.

As such, at least three control pins per device pin is not unusual.

schematic

simulate this circuit – Schematic created using CircuitLab

Of course, care has to be taken to ensure only one of the inputs is ever active at any one time.

Some devices also have other voltage requirements and a more complex circuit can be required.

schematic

simulate this circuit

ADDITION

A further must have, or at least REALLY NICE TO HAVE is a sniffer circuit on the Vcc pin that stops the programmer from applying power when the device is inserted upside down. A really good programmer will include circuitry on all pins in case the selected part <> the actual part.

ADDITION 2

If you want do feed A20, wherever THAT comes from, you can use this circuit, ensuring A20 is low when you apply the 12V.

schematic

simulate this circuit