WiringPi Pins-From Gordon

https://projects.drogon.net/raspberry-pi/wiringpi/pins/

Pins



The following tables give the mapping of the Raspberry Pi GPIO Pins to the GPIO connector in relation to the pin numbers and the physical location on the connector. This is a representation of the GPIO connector as viewed looking at the board from above, with the USB power at the top and the GPIO to the top-right of the board.

If using the connector pin numbering, then note that Pin 1 on the connector is the 3.3v supply. Pin 2 is the 5V supply, and pin 26 is marked SPI CE1 below.

P1: The Main GPIO connector:

wiringPi
Pin
BCM
GPIO
Name Header Name BCM
GPIO
wiringPi
Pin
3.3v 1 | 2 5v
8 R1:0/R2:2 SDA0 3 | 4 DNC
9 R1:1/R2:3 SCL0 5 | 6 0v
7 4 GPIO7 7 | 8 TxD 14 15
DNC 9 | 10 RxD 15 16
0 17 GPIO0 11 | 12 GPIO1 18 1
2 R1:21/R2:27 GPIO2 13 | 14 DNC
3 22 GPIO3 15 | 16 GPIO4 23 4
DNC 17 | 18 GPIO5 24 5
12 10 MOSI 19 | 20 DNC
13 9 MISO 21 | 22 GPIO6 25 6
14 11 SCLK 23 | 24 CE0 8 10
DNC 25 | 26 CE1 7 11
wiringPi
Pin
BCM
GPIO
Name Header Name BCM
GPIO
wiringPi
Pin

P5: The auxilliary GPIO connector on Rev. 2 boards:

wiringPi Pin BCM GPIO Name Header Name BCM GPIO wiringPi Pin
5v 1 | 2 3.3v
17 28 GPIO8 3 | 4 GPIO9 29 18
19 30 GPIO10 5 | 6 GPIO11 31 20
0v 7 | 8 0v
wiringPi
Pin
BCM
GPIO
Name Header Name BCM
GPIO
wiringPi
Pin

DNC -> Do Not Connect. These pins are reserved for future use and should not be connected to at this point in time.

Board Revisions: Please note the differences between board revisions 1 and 2 (R1 and R2 above)

Each side has three columns. The outermost column, headed wiringPi Pin refers to the pin number in the wiring Pi code. The middle one, headed BCM GPIO refers to the pin number of the BCM2835 chip, an this is the pin number used when addressing the GPIO using the/sys/class/gpio interface. The innermost column, Name is the name of the function of the pin.

The central column contains the pin numbers on the header on the board. Pin 1 is the 3.3v power supply.

Note: This page was edited (again!) on the 19th of June 2012 to fix the mistakes of the earlier edit. I have double-checked this against the schematic and by building a set of 15 LEDs and connecting it all up.

Raspbery Pi driving all 17 GPIO pins

Raspbery Pi driving all 17 GPIO pins

 

The photo shows a static shot of a Raspberry Pi driving all 17 GPIO pins with LEDs. The program actually cycles up from Pin 0 to Pin 16 so I can check the exact pin ordering…


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值