📅 Embedded Tuesday #3 Welcome back to Embedded Tuesdays — where each week we explore a new concept from the world of embedded systems! 🔌 GPIO: Push-Pull vs Open-Drain — More Than Just Pins When we set a GPIO pin as output, it feels simple: just drive it HIGH or LOW. But here’s the secret — the way that pin drives the line can make or break your circuit. 🔹 Push-Pull Actively drives the line both HIGH 🔼 and LOW 🔽 Strong, fast, and great for LEDs, digital logic, or anything needing a solid signal ⚠️ Risk: If two push-pull devices share the same line, one might force HIGH while the other forces LOW → direct short circuit between Vcc and GND! 🔹 Open-Drain Can only pull the line LOW — leaves it floating otherwise Requires a pull-up resistor to Vcc to go HIGH Perfect for shared communication buses like I²C, where multiple devices can safely pull the line without fighting each other 💡 Rule of Thumb: Push-Pull = Speed + Strength 💪 Open-Drain = Flexibility + Safety 🤝 ✨ That’s this week’s #EmbeddedTuesdays! 👉 Have you ever had a project fail because of a wrong GPIO mode choice? Share your story below ⬇️ If you’re also into embedded systems or electronics, don’t hesitate to connect with me — I’m always excited to meet like-minded people and share ideas! #embedded #electronics #microcontrollers #hardware #engineering
Thanks for sharing, Ömer Faruk
Love the idea of Embedded Tuesdays! What other things are you thinking of covering in the future? 👀
Useful in output case only, right?
Great explanation of push-pull vs. open-drain! The risk of a short circuit with push-pull outputs is definitely something to keep in mind
Thanks for sharing, Ömer Faruk
💡 Great insight
Thanks for sharing, Ömer Faruk
Senior Principal Engineer at NXP Semiconductors - retired
2mothe open drain or collector has the additional benefit that the output is not pull down if the supply is 0V.