What is the main reason some micro-controllers form a push-pull topology when set as an output pin?
My only guess is not to load the pin. But I couldn't find enough information about the reasons. What are the benefits of push pull output here?
What is the main reason some micro-controllers form a push-pull topology when set as an output pin?
My only guess is not to load the pin. But I couldn't find enough information about the reasons. What are the benefits of push pull output here?
Push-pull means you can drive the output line high (by connecting it to VDD) or low (by connecting it to ground). A proper output needs to be able to do both of those things. [1]
If you're asking why the schematic shows transistors, that's a different question. The transistors form a CMOS inverter. They work exactly the same way as the triangle with a dot on the front. They're probably drawn separately because the transistors that drive the output pin are larger and can supply more current than the transistors used for internal logic. The two inverters together form the output buffer for the pin.
[1] You can also have an "open-drain" output that only has the pull-down transistor. You would then connect a pull-up resistor to the pin. The advantage of this is that you can make a "wired-OR" circuit where multiple open-drain outputs control the same line. The disadvantages are that the output's rise time is slower and the circuit uses extra power when the output is low.
microcontrollers get used in all kind of weird places and putting in the extra transistors to enable push/pull is often worth it to enable those uses.
Push/Pull along with a high-impedance state can combine to mimic either open drain or common collector making it flexible in that way.
Push/pull are not dependent on external resistors to pull the output high or low. This means less external components that need planning for, faster switching and lower power consumption when not switching.
From the comments under ratchet freak's answer:
A power supply can also be turned on or off but it doesnt have push pull output.
That is correct but a power-supply can only source current. It cannot sink current. For flexibility the micro-controller can do both.
simulate this circuit – Schematic created using CircuitLab
Figure 1. The equivalent diagram (top) and various options available with a push-pull output.
Having a push-pull output gives great flexibility in driving various loads.