connect two outputs together

i use esp32 that uses GPIO pin 14 to output PWM at boot…
but i have to use the same pin as input for interrupts that are active low from ds3231 rtc…

I have connected them and looks to work fine…
but i have the question…what really happens when you connect 2 outputs together? i mean maybe here i dont have a problem that GPIO14 outputs only at boot…but what happens when two outputs are connected?

If one output goes high and the other goes low, then they both are likely to sustain damage.

Can you guarantee that they will both always be in the same state?

what i guarantee is that the one will be HIGH momentary (only at boot), the other will be HIGH unless there is an interrupt..

--PS: i managed to pick other pin...but i still have the question...

if both are 3.3V i am ok because its zero voltage difference..
but then i have 3.3V at the one pin and 0V at the other i have 3.3V difference without resistor in between?

A low value resistor in series should protect both outputs and still work for input. You'll have to work out the resistor value from the maximum output currents on both sides.

Connecting two outputs together is very bad practice. Simply don't do it.

Why can't you use separate pins?

Check the data sheet for the DS3231, the interrupt output is open drain, but there is generally a pull-up resistor installed on most clock boards. An inline resistor would solve the situation where the interrupt occurs while the arduino is outputting a HIGH.

Grumpy_Mike:
Connecting two outputs together is very bad practice. Simply don't do it.

Why can't you use separate pins?

its esp32 cam and i have used most of the pins..
but finally i changed one of the other pins and used a "good one" for the interrupt..(exchanged for the one of the two i2c pins)

Check the data sheet for the DS3231, the interrupt output is open drain, but there is generally a pull-up resistor installed on most clock boards. An inline resistor would solve the situation where the interrupt occurs while the arduino is outputting a HIGH.

I have checked with oscilloscope, if there is no alarm, its HIGH.. so i guess it has a pull up resistor in my board..