PindexThông tin chân & datasheet board

Raspberry Pi 4 / 5 (GPIO 40 chân)

Raspberry Pi 4 / 5 (GPIO 40 chân) pinout table

Embedded Linux computer; the standard 40-pin header shared by Pi 2/3/4/5/Zero.

Logic
3.3 V, not 5 V tolerant
Header
2 × 20, 2.54 mm pitch, pin 1 has a square pad
ADC
No ADC – needs an external chip (ADS1115, MCP3008)
Hardware PWM
GPIO12, 13, 18, 19
Numbering
Code uses BCM numbers (GPIOxx), not physical pin numbers
PinHeaderGPIOTypeFunctionsNotes
3V3J8-1–Power3.3 V outputFor light sensors; keep total load under a few hundred mA.
GPIO2J8-32UART/I2CI2C1 SDAFixed 1.8 kΩ pull-up to 3.3 V on the board.
GPIO3J8-53UART/I2CI2C1 SCLFixed 1.8 kΩ pull-up to 3.3 V on the board.
GPIO4J8-74GPIOGPCLK0, 1-Wire (default overlay)
GNDJ8-9–GNDGround
GPIO17J8-1117GPIO
GPIO27J8-1327GPIO
GPIO22J8-1522GPIO
3V3J8-17–Power3.3 V output3.3 V output.
GPIO10J8-1910GPIOSPI0 MOSI
GPIO9J8-219GPIOSPI0 MISO
GPIO11J8-2311GPIOSPI0 SCLK
GNDJ8-25–GNDGround
GPIO0J8-270ReservedID_SD (EEPROM HAT)Reserved for the HAT ID EEPROM. Do not use as GPIO.
GPIO5J8-295GPIO
GPIO6J8-316GPIO
GPIO13J8-3313GPIOPWM1
GPIO19J8-3519GPIOPCM_FS, SPI1 MISO, PWM1
GPIO26J8-3726GPIO
GNDJ8-39–GNDGround
5VJ8-2–Power5 V from the board supplyWired directly to the 5V supply. Never connect to a GPIO.
5VJ8-4–Power5 V from the board supplyWired directly to the 5V supply.
GNDJ8-6–GNDGround
GPIO14J8-814UART/I2CUART0 TXD
GPIO15J8-1015UART/I2CUART0 RXD
GPIO18J8-1218GPIOPCM_CLK, PWM0
GNDJ8-14–GNDGround
GPIO23J8-1623GPIO
GPIO24J8-1824GPIO
GNDJ8-20–GNDGround
GPIO25J8-2225GPIO
GPIO8J8-248GPIOSPI0 CE0
GPIO7J8-267GPIOSPI0 CE1
GPIO1J8-281ReservedID_SC (EEPROM HAT)Reserved for the HAT ID EEPROM. Do not use as GPIO.
GNDJ8-30–GNDGround
GPIO12J8-3212GPIOPWM0
GNDJ8-34–GNDGround
GPIO16J8-3616GPIOSPI1 CE2
GPIO20J8-3820GPIOPCM_DIN, SPI1 MOSI
GPIO21J8-4021GPIOPCM_DOUT, SPI1 SCLK

Manufacturer documents

All boards