I want to convert a push pull (drives to Vcc or Gnd) to a non-inverted open-drain or open-collector (driving LOW at Gnd when the push-pull is low, floating and pulled to Vcc by a resistor when the push-pull is high).
I also want the driving LOW to be conditional on a separate input pin to this converter circuit being driven LOW, so if this extra pin is high the converter always outputs a floating high, only when it is LOW and the push-pull wich is being converted is also low is a LOW to be output.
What is the lowest part-count way I can do this, without resorting to any weird specialised component for which there is only one model and some strange pinout that would be incompatible for any replacements if supply of that one part ran out?
For an inverted converted output, without the extra input making it conditional, I would just have the existing push-pull drive the base of an NPN transistor, emitter at Gnd. I think that the approximately 0.6V above ground which the output could go down to would be low enough for virtually any other chip which was having signal sent to it by the open-drain to recognise this as being a LOW.
But with the inverting, and conditionality on the extra signal, would I need a logic gate chip, and extra transistor and several resistors, or is there a solution which would take less parts and board space?
Thanks