Cromarty
Posts: 64
Joined: Thu Jan 03, 2013 5:03 pm
Location: Godalming, South-east UK
Contact: Website

GPIO pins, wiringpi and pin locations

Fri Mar 15, 2013 12:06 am

Hello. I know this post is initially going to make you all groan and say 'not again' but read on. I've had a Pi for some months now but I'm just about to start using the GPIO pins. My problem is that because I'm blind, none of the posts or diagrams with descriptions of the pins are much use to me.

I have just been to Gordon's page to read about wiringpi and read a bit of text that said when the board is held with the USB ports at the top, the GPIO bus pins are top right, but on my boards they are bottom left.

I have an email list and web site for visually impaired users, and have written a textual description of the GPIO pinouts. I'm now concerned I have it wrong.

The page is at:

http://www.raspberryvi.org/





The 'vi' is for 'visually impaired'.

On the 'Getting Started' page there is a detailed textual description of the Pi board.

So...can someone please confirm for me, in textual form, without linking me to a diagram, which pins are which?

Thanks.

Mike
--
Michael Ray
Analyst/Programmer
Surrey, UK
4xB, 1xB+,
Creator and admin of:
raspberry-vi@freelists.org
Ham radio call: G4XBF
'Suddenly I am become death, destroyer of SD cards'

User avatar
rpdom
Posts: 14700
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: GPIO pins, wiringpi and pin locations

Fri Mar 15, 2013 7:10 am

Hi,

You seem to have all the right details on your web site. The pin numbering you give is correct.
Here is a list of the standard functions for each of the pins on the P1 GPIO connector:

Pin - Function(s)
1 = 3.3 volt power
2 = 5 volt power
3 = GPIO 2 used as SDA
4 = 5 volt power
5 = GPIO 3 used as SCL
6 = 0 volt Ground
7 = GPIO 4
8 = GPIO 14 used as UART serial data transmit
9 = 0 volt Ground
10 = GPIO 15 used as UART serial data receive
11 = GPIO 17
12 = GPIO 18
13 = GPIO 27
14 = 0 volt ground
15 = GPIO 22
16 = GPIO 23
17 = 3.3 volt power
18 = GPIO 24
19 = GPIO 10 used as SPI0 MOSI
20 = 0 volt Ground
21 = GPIO 9 used as SPI0 MISO
22 = GPIO 25
23 = GPIO 11 used as SPI0 SCLK
24 = GPIO 8 used as SPI0 CE0
25 = 0 volt Ground
26 = GPIO 7 used as SPI0 CE1

On earlier model Bs some of the pins were different as follows
3 = GPIO 0 used as SDA
5 = GPIO 1 used as SCL
13 = GPIO 21

You can confirm you have a Revision 2 board by the presence of a hole at the west of the USB connector.

I hope this list is of use to you.

Oh, and I believe that DSI stands for Display Serial Interface, not Digital Serial Interface.

Cromarty
Posts: 64
Joined: Thu Jan 03, 2013 5:03 pm
Location: Godalming, South-east UK
Contact: Website

Re: GPIO pins, wiringpi and pin locations

Fri Mar 15, 2013 7:24 am

Hello. Thanks for this. It's a useful cross-check. After I had posted the above appeal I found a table on elinux which I have re-produced on the web site but your list will help me to check that I have it right.

The hardware revision of both of my Model Bs is '000e' which seems to well exceed Ebben's posts from last September, when the rev 2.0 boards first appeared.

I'll correct the DSI thing on the 'Getting Started' page as well.

Thanks again.

The first project that is going to use the GPIO pins is to connect a Maplin digital multimeter which has a serial interface. I'm going to use a GPIO pin to trigger a sample and get the Pi to speak the result. Talking multimeter. Very useful when you can't see :-)

Mike
--
Michael Ray
Analyst/Programmer
Surrey, UK
4xB, 1xB+,
Creator and admin of:
raspberry-vi@freelists.org
Ham radio call: G4XBF
'Suddenly I am become death, destroyer of SD cards'

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: GPIO pins, wiringpi and pin locations

Fri Mar 15, 2013 9:41 am

Cromarty wrote: I have just been to Gordon's page to read about wiringpi and read a bit of text that said when the board is held with the USB ports at the top, the GPIO bus pins are top right, but on my boards they are bottom left.
USB Power at the top. The USB data ports are then at the bottom.

And the latest addition to wiringPi (not released yet - a few days) also has the ability to use physical pin numbering to describe the pins as well as the native BCM_GPIO pins and wiringPi pins.

And you've made me think now - the new wiringPi site has used a graphic for the pin layout description. That's not going to be a lot of use for you - time for a Plan B...

-Gordon
--
Gordons projects: https://projects.drogon.net/

Return to “C/C++”