I have two common anode 7-segments displays, and only one wire to drive them. I need to achieve the following : when the control signal is +5V, display1 is ON and display2 is OFF. When the signal is 0V, display1 is OFF and display2 is ON. When the signal is not connected (high impedance), both displays are OFF.
I tried using a NPN transistor for display1 and a PNP for display2, connecting their bases together. It works when the driving signal is present, but when the signal is floating current flows from the base of the PNP to the base of the NPN and both transistors turn each other on, resulting in both displays being ON.
The circuit that didn't work :
VCC + | | ___ |< o---------------------|___|--| | |\\ | VCC | | + | | | Display2 | | | | ___ |/ | Input---o---|___|--| GND |>
| | Display1 | | GND
Is there a way to achieve this ?