(1) Floating input_IN_FLOATING - floating input, can be used for KEY identification, RX1
(2) Pull-up input_IPU - IO internal pull-up resistor input
(3) Pull-down input_IPD - IO internal pull-down resistor input
(4) Analog input_AIN - use ADC analog input, or save power under low power consumption
(5) Open drain output_OUT_OD - IO output 0 is connected to GND, IO output 1, floating, an external pull-up resistor is required to achieve high output level. When the output is 1, the state of the IO port is pulled high by the pull-up resistor, but because it is an open drain output mode, the IO port can also be changed to a low level or unchanged by an external circuit. The IO input level change can be read to realize the IO bidirectional function of C51
(6) Push-pull output _OUT_PP - IO output 0- connected to GND, IO output 1 - connected to VCC, the read input value is unknown
(7) Multiplexed function push-pull output _AF_PP - on-chip peripheral function (SCL, SDA of I2C)
(8) Multiplexed function open-drain output _AF_OD - on-chip peripheral function (TX1, MOSI, MISO.SCK.SS)
STM32 setting example:
(1) Simulate I2C using open-drain output _OUT_OD, connected to a pull-up resistor, and can correctly output 0 and 1; when reading the value, first GPIO_SetBits(GPIOB, GPIO_Pin_0); pull high, and then you can read the IO value; use GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_0);
(2) If there is no pull-up resistor, the IO is high by default; if you need to read the value of the IO, you can use the pull-up input_IPU, floating input_IN_FLOATING and open-drain output_OUT_OD
Previous article:Three programming download methods for STM32
Next article:arm-linux-gcc make menuconfig error when porting u-boot2015.04
Recommended ReadingLatest update time:2024-11-16 20:38
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI Reference Voltage (VREF) Application Design Tips
- C Language Zone (4) Continuously Printing Dynamics
- The difference between multilayer PCB and LTCC
- The basis of the difference between TTL and CMOS
- About Puzhong Technology 51 microcontroller development board v3.0, LED part of the problem
- Understanding bandwidth
- Circuit output grounding problem.
- When AD software needs to drill vias to connect the network in the inner electrical layer segmentation, what is the minimum distance between the vias and the inner electrical layer segmentation edge?
- The United States is pressing forward: blacklisting 38 Huawei subsidiaries in an attempt to block Huawei's outsourcing of chips
- Keys? No more! The future of car access systems is here