当前位置:网站首页>Detailed explanation of GPIO input and output
Detailed explanation of GPIO input and output
2022-07-29 05:29:00 【Ryan fitter】
GPIO Detailed explanation of input and output of
1. The difference between pull-up resistance :
Pull up resistance : Send an uncertain signal ( High or low level ), Connected to the power supply through a resistor VCC Connected to a , Fixed at high level .
Pull down resistance : Send an uncertain signal ( High or low level ), Through a resistor to ground GND Connected to a , Fixed at low level .
Common ground : Is to determine the high and low level of the signal , Prevent the existence of uncertain signals in digital circuits .


2. Input mode :
1. Input pull-up (GPIO_Mode_IPU)
Here's the picture : The signal input is pulled up and then triggered ( schmidt ) Convert to a digital signal 0、1 Read the level .

2. Type in the dropdown (GPIO_Mode_IPD)
Here's the picture : The signal input is pulled down and then triggered ( schmidt ) Convert to a digital signal 0、1 Read the level .
3. Analog input (GPIO_Mode_AIN)
Here's the picture : Mainly used for ADC/DAC Signal processing and use , There is no need to go through the pull-down resistance or the trigger .

4. Enter the float (GPIO_Mode_IN_FLOATING)
Here's the picture : Mainly used for IIC,USART Communication protocol , Without going through the pull-down resistance , But after the trigger

3. Output mode :

1. Open drain output (GPIO_Mode_Out_OD)
Here's the picture : It is generally used in the situation of level mismatch , It needs to be connected with pull resistance , When the output is high, it will pass through the inverter , To N-MOS end , The output terminal is pulled up by the pull-up resistor . When the output is low ,N-MOS Conduction , Output to ground , Output low level .

2. Open drain multiplexed output (GPIO_Mode_AF_OD)
Here's the picture : The output of multiplexing function is directly used instead of register , It also needs to pull up the resistor , It mainly provides the second function configuration of the pin , Can be used as communication IIC etc. .

3. Push pull output (GPIO_Mode_Out_PP)
Here's the picture : The output signal also passes through the inverter , after MOS The upper and lower parts of the tube act as output ;
When the output is high, the inverter outputs a low level ,P-MOS Conduction N-MOS end , The signal is affected by the pull-up resistance, so the output is high .
When the output is low, the inverter outputs high ,N-MOS Conduction P-MOS end , The signal is affected by the pull-down resistance, so the output is low .

4. Push pull multiplexed output (GPIO_Mode_AF_PP)
Here's the picture : Directly use the multiplexing function to output , It is mainly used as the second function of the pin for output , The output is the same as the pull-down . Mainly used as serial port .
IO_Mode_AF_PP)**
Here's the picture : Directly use the multiplexing function to output , It is mainly used as the second function of the pin for output , The output is the same as the pull-down . Mainly used as serial port .

边栏推荐
- 数千个数据库、遍布全国的物理机,京东物流全量上云实录 | 卓越技术团队访谈录
- MySQL的基础概念+数据库系统结构+拓展延申+基础命令学习
- 365天挑战LeetCode1000题——Day 042 数组序号转换 + 相对名次 离散化处理
- One dimensional array exercise
- Side effects and sequence points
- 为啥谷歌的内部工具不适合你?
- Custom QML control: imagebutton
- The road to success in R & D efficiency of 1000 person Internet companies
- 365 day challenge leetcode1000 question - distance between bus stops on day 038 + time-based key value storage + array closest to the target value after transforming the array and + maximum value at t
- C语言文件操作
猜你喜欢

365天挑战LeetCode1000题——Day 039 完全二叉树插入器 + 寻找峰值 II + 快照数组

游戏行业弹性计算最佳实践

200 多家 ISV 入驻!阿里云计算巢发布一周年

实现简单的数据库查询(不完整)

Best practices for elastic computing in the game industry

·来一篇编程之路的自我介绍吧·

千人规模互联网公司研发效能成功之路

In depth analysis of common cross end technology stacks of app

Occt learning 001 - Introduction

如视技术副总裁杨永林:当传统产业遇到“数字空间”
随机推荐
使用微信小程序扫码登录系统PC端web的功能
分配内存:malloc()和free()
How rimworld uploads creative workshops through steamcmd
365天挑战LeetCode1000题——Day 035 每日一题 + 二分查找 13
365天挑战LeetCode1000题——Day 041 二分查找完结纪念 + 第 N 个神奇数字 + 在线选举
[event preview] cloud digital factory and digital transformation and innovation forum for small and medium-sized enterprises
Alibaba cloud architect details nine trends in the game industry
Cryengine5 shader debugging
C语言 N皇后问题
Yangyonglin, vice president of Rushi Technology: when traditional industries encounter "digital space"
重定向和文件
vim编辑器使用
实现简单的数据库查询(不完整)
Occt learning 002 - environment construction
刷题狂魔—LeetCode之剑指offer58 - II. 左旋转字符串 详解
End of document
NVIDIA Zhou Xijian: the last mile from design to digital marketing
【C语言系列】— 把同学弄糊涂的 “常量” 与 “变量”
Thousands of databases, physical machines all over the country, JD logistics full volume cloud live record | interview with excellent technical team
Helm chart for Kubernetes