Reprint Address: http://blog.csdn.net/bailyzheng/article/details/8071864
about pull-up input, down input, push-pull output, open-drain output, multiplexed open-drain output, multiplexed push-pull output, and floating-space input, analog input differences
Recently on the Internet to see some people on the STM32 of eight ways to explain, said a lot, and finally read it did not know what to say, in order to facilitate everyone at a glance, I summarize the following, I hope to help you.
1, pull-up input: Pull up is the potential to pull high, such as pull to Vcc. the pull-up is to embed the indeterminate signal through a resistor at high level! Resistance at the same time to limit the flow of action! The weak strength is only the resistance of the pull resistor is different, there is no strict distinction. (that is, the pin is connected to the high level by the resistor)
2, drop-downinput: is to pull the voltage low, pull to GND. Similar to the pull-up principle. (PIN is grounded by resistance)
3, floating air input: floating space (floating) is the logic device input pin is not connected high level, nor low level. Because of the internal structure of the logic device, when its input pin is dangling, it is equivalent to the high level of the pin . When used in practice, pins are not recommended to be suspended and susceptible to interference. Popular speaking is to let the pin nothing to pick up, floating empty.
4 analog input refers to the traditional way of input . digital input is the input PCM digital signal 0,1 binary digital signal convert by digital-to-analog convert to analog signal pre-amplification into power amplifier The power amplifier is still analog.
5. push-Pull output : can output high , low level , connecting digital devices ; Push-pull structure is generally referred to as two transistors are controlled by two complementary signals respectively , always at the time of one transistor conduction and another cutoff. high and low levels are determined by the IC 's power supply.
6, open-drain output : The output is equivalent to the transistor collector . A pull-up resistor is required to get a high level state.. suitable for current-type drives , its ability to absorb current is relatively strong ( typically within 20ma ).
7, multiplexing open-drain output, multiplexing push-pull output: Can be understood as a GPIO port is used as a second function when the configuration (that is, not used as a generic IO Port ).
Choose the IO mode in STM32 , the following is a summary of the reference online.
(1) floating empty input _in_floating -- float input, can do KEY recognition,RX
(2) with pull-up input _ipu--IO Internal pull-up resistor input
(3) with pull-down input _ipd-- IO Internal pull-down resistor input
(4) analog input _ain -- application of ADC analog input, or low power consumption to save power
(5) Open-Drain output_out_od--IOOutput0ConnectGND,IOOutput1, floating, requires an external pull-up resistor to achieve high output level. When the output is1when theIOThe state of the port is pulled high by the pull-up resistor, but because it is an open-drain output mode,IOcan be changed from an external circuit to a low level or unchanged. Can readIOinput level change to achieveC51of theIObidirectional function
(6) Push-pull output _out_pp --IO output 0- connect GND , IO output 1- connected to VCC, read input value is unknown
(7) Push-pull output _af_pp of multiplexing function --on- chip peripheral function (i²c SCL,SDA ) (8) The open-drain output _af_od of the multiplexing function --on- chip peripheral function (Tx1,mosi , Miso. SCK.SS)
This article is from the "whatever957" blog, make sure to keep this source http://whatever957.blog.51cto.com/6835003/1626542
Pull-up input, down input, push-pull output, open-drain output, multiplexed open-drain output, multiplexed push-pull output, and floating-space input, analog input