0
\$\begingroup\$

This question already has an answer here:

I went through the data sheet of STM32F4 and found the pin configuration of GPIOs. I dont understand the difference between these configurations.

• Input floating • Input pull-up • Input-pull-down • Analog • Output open-drain with pull-up or pull-down capability • Output push-pull with pull-up or pull-down capability

I have used some of these configurations by vaguely understanding it. Could you help me to understand how this works? What is the difference between these configurations?

Thanks

\$\endgroup\$

marked as duplicate by PeterJ, Vladimir Cravero, Rev1.0, tcrosley, Wouter van Ooijen Jul 30 '14 at 8:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
\$\begingroup\$

Input floating: Input Floating means Pin can be used as a input and it is not "tied" to anything (means neither pull up nor pull Down) hence called as floating.

Input pull-up: Input pin which is internally pulled up with a resistor (Pin connected with VCC Via a resistor). Resister value can be found in the datasheet.

Input-pull-down: Input pin which is internally pulled down with a resistor (Pin connected with GND Via a resistor). Resister value can be found in the datasheet.

Analog: Analog pin might be connected with an internal DAC or ADC. and can be used for analog application like voltage sensing or controlling the brightness of an LCD.

Output open-drain with pull-up or pull-down capability: Open Drain output can be treated as transistor's collector, to get high state requires a pullup resistor.

Output push-pull with pull-up or pull-down capability: push-pull structure generally refers to two transistors (One PNP and other NPN) are controlled by two complementary signals.Either of the transistor gets on while the other turns off.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.