Raspberry PI GPIO connector

Raspberry PI A+, B+ and 2B GPIO J8 40-pin pinout. Raspberry PI Models A and B have only the first 26 pins.

GPIO#2nd funcpin#pin#2nd funcGPIO#
+3V312+5V
GPIO2SDA1 (I2C)34+5V
GPIO3SCL1 (I2C)56GND
GPIO4GCLK78TXD0 (UART)GPIO14
GND910RXD0 (UART)GPIO15
GPIO17GEN01112GEN1GPIO18
GPIO27GEN21314GND
GPIO22GEN31516GEN4GPIO23
+3V31718GEN5GPIO24
GPIO10MOSI (SPI)1920GND
GPIO9MISO (SPI)2122GEN6GPIO25
GPIO11SCLK (SPI)2324CE0_N (SPI)GPIO8
GND2526CE1_N (SPI)GPIO7
(Models A and B stop here)
EEPROMID_SD2728ID_SCEEPROM
GPIO52930GND
GPIO63132GPIO12
GPIO133334GND
GPIO193536GPIO16
GPIO263738GPIO20
GND3940GPIO21

Model B rev 2 also has P6 which has 8 pins offering access to an additional 4 GPIO connections.

Function2nd funcpin#pin#2nd funcFunction
+5V12+3V3
GPIO28GPIO_GEN734GPIO_GEN8GPIO29
GPIO30GPIO_GEN956GPIO_GEN10GPIO31
GND78GND

Models A and B provide GPIO access to the ACT status LED using GPIO 16. Models A+ and B+ provide GPIO access to the ACT status LED using GPIO 47, and the power status LED using GPIO 35.