I have a small project where I select two states by redirecting Vcc/gnd to the thing that's supposed to be active. See image of how it looks.
This works fine, but now I'm looking into removing the physical switch and implement it in a PIC instead. One output pin of the PIC will be either low or high, and I want this to simulate the physical switch. It does not matter if the switch is done with BJT or FET, but I have BJT at home so this will be the easiest to try with.
However, I'm at a loss figuring it out how it should be coupled. Tying the base of a NPN/PNP together gave me the state of both "things" having Vcc/gnd at the same time (which is supposed to be an illegal state).
Question: is it possible to achieve what I want using only one GPIO-pin and NPN/PNP:s?
EDIT
For clarity, Pin 1 (Vcc) and Pin 4 (Gnd) goes to a small milliamp-load (LED #1), while Pin 3 (Vcc) and Pin 6 (Gnd) goes to another small milliamp-load (LED #2). The DPDT-switch controls both Vcc and Gnd to the loads, I'm looking for a transistor solution that does the same.