【Raspberry pi】GPIO注意事项
2024-09-27 12:46:33
1、GPIO编码的方法
- 第三列是树莓派板子上的自然编号(左边引脚为1-15,右边引脚为2-26),
RPi.GPIO.setmode(GPIO.BOARD)
采用这列编号 - 树莓派主芯片提供商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 |
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欧的元器件总电阻。
最新文章
- tweenmax.js 文档
- [小哥Allegro72讲速成视频]
- office2010里怎么设置页码为第几页共几页
- Android应用性能测试
- 对Spring的IoC和DI最生动的解释
- Codeforces Round #249 (Div. 2)B(贪心法)
- Xposed知识
- ASP.NET 中Request.QueryString 中的key
- Combination Sum 解答
- FZU2179(数位dp)
- MyEclipse和Eclipse非常方便的快捷键
- Linux基本命令总结(八)
- Java数组之二维数组
- 打开word出现setup error,怎么解决?
- Oracle11g 启动数据库实例、关闭数据库实例
- ubuntu下使用golang、qml与ubuntu sdk开发桌面应用 (简单示例)
- scrapy 异步存储mysql
- HTTP 和 HTTPS 的异同
- HTTPS演变小图
- Javascript修正this的引用