raspberry pi gpio pinout

2
GPIO Pinout The majority of I/O pins on the Raspberry Pi exist on the 26-pin header labeled “P1”. It’s over in the corner of the board, adjacent to the composite video connector. If you’re coming to the Raspberry Pi as an Arduino user, you’re probably used to referencing pins with a single, unique number. Programming the Pi’s hardware works much the same, each pin has its own number…and then some. There are (at least) two, different numbering schemes you may encounter when referencing Pi pin numbers: (1) Broadcom chip- specific pin numbers and (2) P1 physical pin numbers. You’re usually free to use either number-system, but many programs require

Upload: serfary

Post on 19-Nov-2015

249 views

Category:

Documents


6 download

DESCRIPTION

This file teach us about ping at Raspberry Pi board. How to connect them and what are they used.

TRANSCRIPT

GPIO PinoutThe majority of I/O pins on the Raspberry Pi exist on the 26-pin header labeled P1. Its over in the corner of the board, adjacent to the composite video connector.

If youre coming to the Raspberry Pi as anArduinouser, youre probably used to referencing pins with a single, unique number. Programming the Pis hardware works much the same, each pin has its own numberand then some.There are (at least) two, different numbering schemes you may encounter when referencing Pi pin numbers: (1) Broadcom chip-specific pin numbers and (2) P1 physical pin numbers. Youre usually free to use either number-system, but many programs require that you declare which scheme youre using at the very beginning of your program.Heres a table showing all 26 pins on the P1 header, including any special function they may have, and their dual numbers:Broadcom PinFunctionP1 PinP1 PinFunctionBroadcom Pin

3.3V125V

2SDA345V

3SCL56GND

478TX14

GND910RX15

171112PWM18

271314GND

22151623

3.3V171824

10MOSI1920GND

9MISO212225

11SCLK2324CE08

GND2526CE17

Legend:5V3.3VGNDI2CSPIPWM

Note:The Broadcom pin numbers above relate to Rev2 of the Raspberry Pionly. If you have an older Rev1 Pi, check outthis linkfor your Broadcom pin numbers.As you can see, the Pi not only gives you access to17 bi-directional I/O pins, but alsoSerial (UART),I2C,SPI, and even somePWM(analog output).