problem is that i have a circuit and its loop is controlled by output signal of 8051,,so that loop is completed and circuit is activated,, i have used transistor for tristate switching but it is not working properly.. any suggestion for tristate switching controlled by 8051,,,,??????? thanks
If you want to put micro pin in tristate - make it an input pin (it is not a true tristate but it is very closed since with most micro's digital pin input resistance is high)
Tri-state control can’t be done with one transistor and one microcontroller pin ..
You need two transistors: one to source current from Vcc, and one to sink current to GND ..
When both transistors are off you have “third” state – high impedance ..
And two transistors means two microcontroller pins ..