首页 技术 正文
技术 2022年11月12日
0 收藏 635 点赞 2,450 浏览 1011 个字

1、GPIO编码的方法

  1. 第三列是树莓派板子上的自然编号(左边引脚为1-15,右边引脚为2-26),RPi.GPIO.setmode(GPIO.BOARD)采用这列编号
  2. 树莓派主芯片提供商Broadcom的编号方法,相当于调用了WiringPiSetupGpio()RPi.GPIO.setmode(GPIO.BCM)采用这列编号
wiringPi Pin Name Board Pin BCM GPIO
0 GPIO 0 11 17
1 GPIO 1 12 18
2 GPIO 2 13 21
3 GPIO 3 15 22
4 GPIO 4 16 23
5 GPIO 5 18 24
6 GPIO 6 22 25
7 GPIO 7 7 4
8 SDA 3 0
9 SCL 5 1
10 CE0 24 8
11 CE1 26 7
12 MOSI 19 10
13 MISO 21 9
14 SCLK 23 11
15 TXD 8 14
16 RXD 10 15

Rev.2 新增的引脚:

wiringPi Pin Name Board Pin BCM GPIO
17 GPIO 8   28
18 GPIO 9   29
19 GPIO10   30
20 GPIO11   31

【Raspberry pi】GPIO注意事项

2、GPIO的电气特性

Also from the wiki the “maximum permitted current draw from the 3v3 pin is 50mA” and the “maximum permitted current draw from the 5v pin is the USB input current (usually 1A) minus any current draw from the rest of the board.” The current draw for Model B is stated as 700mA so with a 1A power supply this leaves about 300mA to play with.

对于3.3伏的线路科承受的电流上限是50mA,对于5V的是700mA,

There will also be an issue with trying to draw to much power form the pins, according to the data-sheet each pin programmed to current drive between 2mA and 16mA, and it has been warned that trying to draw 16mA from several pins at once could also lead to a damaged Pi.

对于其他针脚可承受的上限是16mA,对3.3V的话至少要接入210欧的元器件总电阻。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,104
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,580
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,428
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,835
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,918