Go Down

Topic: connect two outputs together (Read 234 times) previous topic - next topic

uzer123

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?


JohnLincoln

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?

uzer123

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?

gutbag

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.

Grumpy_Mike

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

Why can't you use separate pins?

david_2018

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.

uzer123

#6
May 14, 2020, 09:47 pm Last Edit: May 14, 2020, 09:48 pm by uzer123
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)

Quote
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..

Go Up