Pin Definition
Summary
This page documents the complete GPIO pin definitions for the Banana Pro and Banana Pi, covering the 26-pin main header and the CON6 expansion header. Understanding pin functions, numbering schemes, and electrical limits is essential before connecting any external hardware.
Who This Is For
Hardware developers, makers, and hobbyists who plan to interface sensors, LEDs, motors, or other peripherals with the Banana Pro or Banana Pi GPIO headers.
What You Will Learn
- Physical pin layout and numbering for both headers.
- Alternate pin functions (I2C, SPI, UART, PWM).
- Electrical specifications and safety limits.
- WiringPi pin mapping for software access.
Pin Numbering Schemes
Three numbering systems are commonly used and this can be a source of confusion:
- Physical pin number: The position on the header (1–26). Pin 1 is typically marked on the board silkscreen.
- GPIO number: The Linux kernel GPIO index used in
/sys/class/gpio. - Allwinner port number: The SoC-level designation such as PH2, PI3, etc.
When using the WiringPi library, a fourth mapping (WiringPi pin number) is also used. Refer to the WiringPi page for the complete mapping table.
26-Pin Main Header
The main 26-pin header is physically and electrically compatible with the Raspberry Pi Model B header layout:
- Pin 1: 3.3 V power output
- Pin 2: 5 V power output
- Pin 3: GPIO / I2C SDA (PB21)
- Pin 5: GPIO / I2C SCL (PB20)
- Pin 6: Ground
- Pin 8: UART TX (PH0)
- Pin 10: UART RX (PH1)
- Pin 12: GPIO / PWM (PH2)
- Pin 19: SPI MOSI (PI12)
- Pin 21: SPI MISO (PI13)
- Pin 23: SPI SCLK (PI11)
- Pin 24: SPI CE0 (PI10)
- Pin 26: SPI CE1 (PI14)
Remaining even-numbered pins provide additional GPIOs and ground connections.
CON6 Expansion Header
The CON6 header provides additional GPIO, CSI camera, and other signals. This header is unique to the Banana Pi and Banana Pro and does not follow Raspberry Pi conventions.
Electrical Specifications
⚠ Important: All GPIO pins on the Banana Pro and Banana Pi operate at 3.3 V logic levels. They are not 5 V tolerant. Applying 5 V to any GPIO pin will damage the Allwinner A20 SoC permanently.
- Logic high voltage: 3.3 V
- Maximum current per GPIO pin: 10 mA (recommended), 40 mA (absolute maximum)
- Total GPIO current: Do not exceed 100 mA combined across all GPIO pins.
- 3.3 V rail: Supplies up to 300 mA total from the onboard regulator.
- 5 V rail: Directly connected to the input power supply; limited by your power adapter.
Pin Functions Overview
- GPIO: General-purpose input/output, configurable in software.
- I2C: Two-wire serial bus for sensors and peripherals (bus 2 on pins 3 and 5).
- SPI: High-speed serial bus for displays, ADCs, and flash memory (pins 19, 21, 23, 24, 26).
- UART: Serial console or communication (pins 8 and 10).
- PWM: Pulse-width modulation output for motor control or LED dimming (pin 12).
Troubleshooting
- Pin does not respond: Ensure the correct GPIO number is exported and the direction is set (
echo out > /sys/class/gpio/gpioN/direction). - Unexpected behaviour: Check for pin muxing conflicts — only one alternate function can be active at a time. Review the Fex configuration.
- Board damaged after wiring change: This may indicate 5 V was applied to a 3.3 V pin. Always use a level shifter for 5 V devices.
Related Pages
Author: LeMaker Documentation Team
Last updated: 2026-02-10