I want to have an opto-isolated output which can be driven high, low or left floating. I thought of the following circuit but I'm quite new to electronics so I don't know whether it makes sense. Do you think something like this could work?
When EN from the input side is high, IC2 is supposed to drive the output high or low. When EN is low, IC2's output should be floating.
As I understand it, when the transistor in IC2 is conducting, the OUT pin goes low. When it's not conducting, it floats. So, by itself, the optocoupler can drive the output only to ground or leave it floating. I want to drive it high also, am I understanding something terribly wrong?
Edit: Sorry my original question wasn't so clear about what I want to do with this circuit. I want to have multiple copies of the input/output circuit, preferably controlled with just one enable/disable circuit.
Also, I'd like to use a high speed device since one of the outputs will be a serial link and I don't know how to find a fast standard-type optocoupler.