element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Technical Library
  • Products
  • Dev Tools
  • Technical Library
  • More
  • Cancel
Technical Library
Documents Raspberry Pi GPIO Expansion - Low Level Peripherals
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Technical Library to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: atomar
  • Date Created: 8 Mar 2012 9:29 AM Date Created
  • Last Updated Last Updated: 8 Oct 2021 4:49 AM
  • Views 2460 views
  • Likes 0 likes
  • Comments 4 comments
Related
Recommended

Raspberry Pi GPIO Expansion - Low Level Peripherals

Introduction

 

The Raspberry Pi allows peripherals and expansion boards to access the CPU by exposing the in and outputs. The production board has a 26-pin 2.54mm (100mil) expansion header, arranged in a 2x13 strip. They provide 8 GPIO pins plus access to I2C, SPI, UART), as well as +3V3, +5V and GND supply lines. Pin one is column 0 on the bottom row. Voltage levels are 3v3. There is no over-voltage protection on the board - the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board.


It is also possible to reconfigure some of the pins to provide a second I2C interface.
Kernel boot messages go to the UART at 115200bps.


Header Pinout:

Top Row

5V0

DNC

GND

TXD

RXD

GPIO1

DNC

GPIO4

GPIO5

DNC

GPIO6

SPI_CE0_N

SPI_CE1_N

Bottom Row

3V3

SDA0

SCL0

GPIO7

DNC

GPIO0

GPIO2

GPIO3

DNC

SPI_MOSI

SPI_MISO

SPI_SCLK

DNC

 

Colour legend

+5V

+3.3V

Do not connect

UART

GPIO

SPI

I2C

 

Power Pins

Maximum permitted current draw from the 3v3 pin is 50mA.

Maximum permitted current draw from the 5v pin is the USB input current (usually 1A) minus any current draw from the rest of the board.

  • Model A: 1000mA - 500mA -> max power draw: 500mA
  • Model B: 1000mA - 700mA -> max power draw: 300mA

 

General Purpose Input/Output (GPIO)

General Purpose Input/Output (GPIO) is a generic pin on a chip whose behaviour (including whether it is an input or output pin) can be controlled (programmed) through software. All the UART, SPI and I2C pins can be reconfigured as GPIO pins, to provide a total of 17 GPIO pins. Each of their functions is detailed in the Broadcom BCM2835 chipset datasheet.


The available alternative functions and their corresponding pins are detailed below. These numbers are in reference to the chipset documentation and may not match the numbers exposed in linux or detailed above. Only fully usable functions are detailed, for some alternative functions not all the necessary pins are available for the functionality to be actually used. All exposed pins can be used for GPIO

 

Top Row Pinout:

Header

2

4

6

8

10

12

14

16

18

20

22

24

26

Chipset

14

15

18

23

24

25

8

7


Function

5V0

DNC

GND

TXD

RXD

PWM

DNC

GPIO

GPIO

DNC

GPIO

SPI_CE0_N

SPI_CE1_N

 

Bottom Row Pinout:

Header

1

3

5

7

9

11

13

15

17

19

21

23

25

Chipset

0

1

4

17

21

22

10

9

11

Function

3V3

SDA0

SCL0

GPIO

DNC

GPIO

GPIO

GPIO

DNC

SPI_MOSI

SPI_MISO

SPI_SCLK

DNC

 

The complete list of chipset pins which are available are:

0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25

 

  • Pin 12 supports PWM.
  • GPIO voltage level is 3V3 and are not 5V tolerant.
  • Each GPIO can interrupt, high/low/rise/fall/change.

It is also possible to reconfigure some of the pins to provide an ARM JTAG interface. However ARM_TMS isn't available for this (chipset pin 12 or 27 is needed).

It is also possible to reconfigure some of the pins to provide an I2S (hardware mod may be required) or PCM interface.

 

MIPI CSI-2

The MIPI CSI-2 interface to a 15-way flat flex connector is Sony sub-LVDS.

 

DSI

The DSI interface to a 15-way flat flex connector.


CEC

HDMI-CEC (Consumer Electronics Control for HDMI) is supported by hardware but some driver work will be needed and currently isn't exposed into Linux userland.

  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
  • fustini
    fustini over 12 years ago in reply to Former Member

    Hi - take a look at this article on the eLinux wiki: http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29

     

    This charts shows different pin functions:

    http://elinux.org/RPi_BCM2835_GPIOs

     

    The SoC ARM datasheet should also provide info:

    http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago

    I would like to understand if we can re-configure the GPIO pins? I see that there are upto 5 alternate functions for every GPIO. I need to have more than 4 GPIO with 3/5V. Any help on how I can achieve this?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago

    The view as PDF, does not do color.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 13 years ago

    I'm a little confused MIPI CSI-2 (Camera Serial Interface 2) is a camera interface standard and DSI interface is Display Serial Interface (A bit like ATM machine) but Low Voltage Differential Signaling refers to both LCD's and Camera's.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube