Electronic – Can Transmission gates be used to implement 3 State Logic

digital-logicopen-drain

In my application i need to use a common line shared between two peripherals, i have to indicate to the devices whenever the bus is free or not, hence i can't have push-pull output where the output is either 0 or 1 , as these states are generally used for data transmission.

Instead i would prefer to have a open drain scenario, where the output "floats", to indicate to the device that the bus is free.

Now to achieve this, i want to use a transmission gate, where the third state(open) is used by controlling the enable pin, if enable is on (the normal 2- state logic, 0 or 1 where input flows to output), else the output pin floats.

Now my question is , if this setup is similar to the the way 3 state logic is used in microcontrollers/microprocessors , where an internal pull up resistor controls , the logic of the output pin , if it is different then in what way does it differ ?

Also have i missed something, do i have to read anything more to complete my understanding ??

EDIT

The Line is driven by a totem pole output, where only logic 1(5v), and Logic 0(0v) , signals are driven.

Best Answer

The question seems rather confused in several respects...

1) It is unclear whether you want to implement 3-state logic or an open-drain interconnection.

In the former, the driving device DOES use a push-pull output, driving 0 or 1 onto the bus. The other devices, meanwhile, must abstain from driving until some separate system signals that it is their turn.

In the latter, the bus is always pulled to '1' by a resistor, and any device may pull it to '0'. In this case, there is no harm done if several devices drive the bus simultaneously, though any messages may be corrupted.

2) You say you want a "floating" bus to indicate that the bus is free. In neither case is this normally possible (there is no logic primitive that can detect that a bus is floating). This is why in tri-state logic there must be another system (bus arbitration logic) to keep track of who has the bus, and give each device a turn.

Now as to the specific question of transmission gates : either of these systems can be trivially implemented using transmission gates, though there are other and sometimes better ways.

Tri-state logic can be implemented using a normal push-pull (totem-pole) output, and a transmission gate between the push-pull output and the bus. The bus arbiter simply switches the transmission gate on or off. It is often more economical to turn off both transistors in the push-pull output instead.

Open drain logic can be implemented with a transmission gate by simply connecting one side of it to ground, and the other to the bus. Now simply turn it on to pull the bus low.