「树莓派」「上海晶珩」「EDATEC」GPIO 功能及复用功能表

您所在的位置:网站首页 stm32f4引脚复用表 「树莓派」「上海晶珩」「EDATEC」GPIO 功能及复用功能表

「树莓派」「上海晶珩」「EDATEC」GPIO 功能及复用功能表

2023-05-13 08:49| 来源: 网络整理| 查看: 265

0 分享至

用微信扫码二维码

分享至好友和朋友圈

GPIO

板上有两个5V引脚和两个3.3V引脚,以及一些不可配置的接地引脚(0V)。其余引脚都是通用3.3V引脚,意味着输出设置为3.3V,输入为3.3V容差。

OUTPUTS

指定为输出引脚的GPIO引脚可以设置为高电平(3.3V)或低电平(0V)。

INPUTS

指定为输入引脚的GPIO引脚可以读取为高电平(3.3V)或低电平(0V)。使用内部上拉或下拉电阻更容易做到这一点。引脚GPIO2和GPIO3具有固定的上拉电阻,但对于其他引脚,这可以在软件中配置。

MORE

除了简单的输入和输出设备,GPIO引脚还可以用于各种替代功能,有些可用于所有引脚,有些可用于特定引脚。

PWM (脉冲宽度调制)

Software PWM available on all pinsHardware PWM available on GPIO12, GPIO13, GPIO18, GPIO19

SPI

SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0 (GPIO8), CE1 (GPIO7)SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0 (GPIO18); CE1 (GPIO17); CE2 (GPIO16)

I2C

Data: (GPIO2); Clock (GPIO3)EEPROM Data: (GPIO0); EEPROM Clock (GPIO1)

Serial

TX (GPIO14); RX (GPIO15)

有关GPIO引脚高级功能的更多信息,请参见interactive pinout diagram

raspi-gpio

是一个在树莓派上使用的GPIO控制工具,可以获取GPIO状态以及设置GPIO

raspi-gpio

安装

sudo apt -y install raspi-gpio

使用说明

Use:raspi-gpio get [GPIO]ORraspi-gpio set

[options]ORraspi-gpio funcs [GPIO]ORraspi-gpio raw

GPIO is a comma-separated list of pin numbers or ranges (without spaces),e.g. 4 or 18-21 or 7,9-11Note that omitting [GPIO] from raspi-gpio get prints all GPIOs.raspi-gpio funcs will dump all the possible GPIO alt funcions in CSV formator if [GPIO] is specified the alternate funcs just for that specific GPIO.Valid [options] for raspi-gpio set are:ip set GPIO as inputop set GPIO as outputa0-a5 set GPIO to alternate function alt0-alt5pu set GPIO in-pad pull uppd set GPIO pin-pad pull downpn set GPIO pull none (no pull)dh set GPIO to drive to high (1) level (only valid if set to be an output)dl set GPIO to drive low (0) level (only valid if set to be an output)Examples:raspi-gpio get Prints state of all GPIOs one per lineraspi-gpio get 20 Prints state of GPIO20raspi-gpio get 20,21 Prints state of GPIO20 and GPIO21raspi-gpio set 20 a5 Set GPIO20 to ALT5 function (GPCLK0)raspi-gpio set 20 pu Enable GPIO20 ~50k in-pad pull upraspi-gpio set 20 pd Enable GPIO20 ~50k in-pad pull downraspi-gpio set 20 op Set GPIO20 to be an outputraspi-gpio set 20 dl Set GPIO20 to output low/zero (must already be set as an output)raspi-gpio set 20 ip pd Set GPIO20 to input with pull downraspi-gpio set 35 a0 pu Set GPIO35 to ALT0 function (SPI_CE1_N) with pull upraspi-gpio set 20 op pn dh Set GPIO20 to ouput with no pull and driving high

GPIO功能及复用功能表

转载来自:https://rpideveloper.com/topic/34/gpio

www.edatec.cn/cn/ WX:树莓派开发者

特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。

Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.

/阅读下一篇/ 返回网易首页 下载网易新闻客户端


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3