I'm experimenting with switches and toggles today, and encountered one problem for which I need a hint. How can I electronically switch connect or disconnect a signal line that occasionally goes much higher than Vdd, i.e. between 9 and 14V?
I've come up with a circuit that allows me to connect and disconnect a PICkit3 from the target board using a single momentary switch. Yes, not the most useful thing, and I could use a slide switch, but it's really just an exercise to figure out how to do something like that, and disconnecting the PICkit3 is the first practical example that came to mind.
I can disconnect and reconnect the data lines of the PICkit3 easily using a 74HC4066 analog switch. However, the reset line goes into the range 9-14V when entering programming mode, and the 4066 as well as a couple of other types of switches I looked at only handle Vdd+0.5V or something like that. I could use a relay, but I was hoping there was a more elegant, solid state, solution?
My first thought was using a transistor, but: the reset line has 3 states, low (0V), high (3.3V) and programming (9V), and I couldn't figure out how to make that work. So, how do you do it?