WiringPi Pins-From Gordon

来源:互联网 发布:网络直播概念股 编辑:程序博客网 时间:2024/05/10 15:50

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
PinBCM
GPIONameHeaderNameBCM
GPIOwiringPi
Pin––3.3v1 | 25v––8R1:0/R2:2SDA03 | 4DNC––9R1:1/R2:3SCL05 | 60v––74GPIO77 | 8TxD1415––DNC9 | 10RxD1516017GPIO011 | 12GPIO11812R1:21/R2:27GPIO213 | 14DNC––322GPIO315 | 16GPIO4234––DNC17 | 18GPIO52451210MOSI19 | 20DNC––139MISO21 | 22GPIO62561411SCLK23 | 24CE0810––DNC25 | 26CE1711wiringPi
PinBCM
GPIONameHeaderNameBCM
GPIOwiringPi
Pin

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

wiringPi PinBCM GPIONameHeaderNameBCM GPIOwiringPi Pin––5v1 | 23.3v––1728GPIO83 | 4GPIO929181930GPIO105 | 6GPIO113120––0v7 | 80v––wiringPi
PinBCM
GPIONameHeaderNameBCM
GPIOwiringPi
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…


原创粉丝点击