当前位置:网站首页>STM32 GPIO CSDN creative punch in
STM32 GPIO CSDN creative punch in
2022-07-03 23:50:00 【Freeze memory 1024】
GPIO Structure diagram
Push pull output (0-3.3):
Enter High level when , At the top of the P-MOS Conduction , At the bottom of the N-MOS end , External output High level .
Enter Low level when ,N-MOS The pipe is open ,P-MOS end , External output Low level .
When the pin level switches between high and low , Two pipes turn on ,P The tube is responsible for filling the current ,N The tube is responsible for pulling the current , The load capacity and switching speed are greatly improved compared with ordinary methods . The low level of push-pull output is 0 v , The high level is 3.3 v .
Open drain output (0-5):
In open drain output mode , At the top of the P-MOS The tube is always in the cut-off state . When the input power is low ,P-MOS Pipe cut off ,N-MOS The pipe is open , External output low level .
If the control input is high , be P-MOS The tube is closed ,N-MOS The tube is in the cut-off state , So the pin neither outputs high level , It doesn't output low level either , It's a high resistance state . Output high level if necessary (5V), A pull-up resistor must be connected externally .
It has “ Line and ” characteristic . in other words , If there are many open drain mode pins connected together , Only if all the pins output high resistance state , The pull-up resistor provides the high level , The voltage of this high level is the voltage of the power supply connected to the external pull-up resistor . If one of the pins is low , Then the line is equivalent to a short circuit to ground , Make the whole line low ,0 v .
Output data register :
The above mentioned double MOS The input signal of the tube structure circuit , By GPIO“ Output data register “GPIOx_ODR” Provided , So we can modify it by modifying the value of the output data register GPIO The output level of the pin .
Reuse function output
“ Reuse function output ” Medium “ Reuse ” Refer to STM32 Other on-chip peripherals of GPIO Pin control , here GPIO The pin is used as part of the peripheral , Second use . From other peripherals “ Multiplexing function output signal ” And GPIO Its own data registers are connected to the double MOS In pipe structure , The ladder structure on the way is used as the switch switching selection .
For example, we use USART Serial communication , You need to use something GPIO The pin is used as the communication transmission pin , At this time, we can GPIO The pins are configured to USART Serial port multiplexing function , The pin is controlled by the serial peripheral , send data .
边栏推荐
- Advanced C language - pointer 2 - knowledge points sorting
- How to make recv have a little temper?
- After the Lunar New Year and a half
- ADB related commands
- Fashion cloud interview questions series - JS high-frequency handwritten code questions
- Zipper table in data warehouse (compressed storage)
- Report on the construction and development mode and investment mode of sponge cities in China 2022-2028
- Selenium check box
- Double efficiency. Six easy-to-use pychar plug-ins are recommended
- Selenium library 4.5.0 keyword explanation (II)
猜你喜欢
Common mode interference of EMC
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Amway by head has this project management tool to improve productivity in a straight line
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Pyqt5 sensitive word detection tool production, operator's Gospel
Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
Zipper table in data warehouse (compressed storage)
JDBC Technology
Unsafe and CAS principle
Vscode regular match replace console log(.*)
随机推荐
Social network analysis -social network analysis
Idea a method for starting multiple instances of a service
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Alibaba cloud container service differentiation SLO hybrid technology practice
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) simulated examination and Guangdong Provincial Safety Officer a certificate third batch (main person in charg
China standard gas market prospect investment and development feasibility study report 2022-2028
C # basic knowledge (2)
Learning methods of zynq
How to quickly build high availability of service discovery
Gossip about redis source code 83
leetcode-43. String multiplication
"Learning notes" recursive & recursive
[2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections
C # basic knowledge (3)
C # basic knowledge (1)
2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
X Opencv feature point detection and matching
炒股開戶傭金優惠怎麼才能獲得,網上開戶安全嗎
Introduction to the gtid mode of MySQL master-slave replication
Schematic diagram of crystal oscillator clock and PCB Design Guide