cancel
Showing results for 
Search instead for 
Did you mean: 

Question on GPIO

nps
Associate II
Posted on May 08, 2016 at 05:21

Hi all,

I have seen a code where a GPIO pin is configured as output in push-pull mode but the pin is driven by an external circuit to low some times (essentially shorting the top transistor to GND). Is it safe to implement such a circuit? Will the I/O pin remain undamaged? Your comments please? Thank you.

PS: I have created a sample schematic for clear understanding of my question.
3 REPLIES 3
allahyarzadeh
Associate II
Posted on May 08, 2016 at 09:25

If you have access to that external circuit, it would be better to make it as a switch with pull-down resistor.

Posted on May 08, 2016 at 13:27

I have seen a code where a GPIO pin is configured as output in push-pull mode but the pin is driven by an external circuit to low some times

Where? Provide some context. Is it a bus interface where the direction might be reconfigured?

Clearly creating this kind of contention is not desirable.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
nps
Associate II
Posted on May 09, 2016 at 09:45

I/O ports are being used as data bus. Port bits are connected to LCD. After going through the code I realized that no read is being done, so I guess it is ok to have push-pull. Ideally open collector with pull-ups, but speed may be hampered. Thank you.