arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

P5 Pinout partial information!

Sat Sep 08, 2012 8:40 pm

I had hoped that they would have organised the pin out the same as the end 6 pins of P1 with the two GPIO pins and extra earth using the equivalent unconnected pin on P1 and the two extra pins, but no :(
The P5 pin closest to the corner is 5V and the pin next to it going towards the SD card is 3.3V (so like P1) but then the Earth pins are the two at the other end of the P5.
If the four GPIO pins in between are defaulting to I2C + two general GPIOs then I should be able to work out SDA & SCL by trial and error (Using our Real Time Clock module) when/if I have time.
I have confirmed that if you fit P5 on the top you can have a GPIO cable plugged into P1 and a Board like our RTC into P5. (The GPIO cable can't use a strain relief)
Plugging our RTC into P5 on the top does clash with use of the DSI connector but so did using P1 for our RTC!
So it does mean having a different design for any RTC modules if using P5 than P1 :(

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: P5 Pinout partial information!

Sun Sep 09, 2012 9:32 pm

Thanks for the info. As soon as I get my rev 2 I'll be soldering on a header. Those 4 extra GPIO pins will be useful.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

DogEars
Posts: 44
Joined: Sun Jun 17, 2012 1:16 pm

Re: P5 Pinout partial information!

Mon Sep 10, 2012 8:50 am

So the I2S pins will be the middle 4 pins in a square.

Now I'm after a header that would fit a connector, much like the little plastic connector used to power a 3.5" floppy drive, what's that called?

Ears.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: P5 Pinout partial information!

Mon Sep 10, 2012 9:26 am

The floppy drive power connector is some sort of Molex connector.

P5 is a standard 2 row 0.1" 8 pin header (i.e. 2x4). Something like :
http://uk.farnell.com/te-connectivity-a ... dp/1248134
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Mon Sep 10, 2012 11:32 am

Is there any information about the exact location of each pin and their functions yet?

DogEars
Posts: 44
Joined: Sun Jun 17, 2012 1:16 pm

Re: P5 Pinout partial information!

Mon Sep 10, 2012 12:57 pm

Something like this would allow the connector to exit parallel to the board from the side:
http://www.molex.com/molex/products/dat ... TACLES.xml
and something like this on the end of the lead?
http://www.molex.com/molex/products/dat ... USINGS.xml

Would that work?

G.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: P5 Pinout partial information!

Fri Sep 14, 2012 10:26 am

I received my Rev 2 board and the first thing I did (after powering it up) was testing the P5 pins to work out how the GPIO connections were arranged.

Here is the results :

1 +5V
2 +3V3
3 GPIO28
4 GPIO29
5 GPIO30
6 GPIO31
7 Ground
8 Ground

Raspberry Pi P5 Header
http://www.raspberrypi-spy.co.uk/2012/0 ... p5-header/
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13370
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: P5 Pinout partial information!

Fri Sep 14, 2012 10:48 am

How did you figure out which GPIO was which? Did you toggle them one for one in software, and measured which one was toggling?

For people that want to connect the connector topside (against the intention of the designer, who seems to have taken pains to prevent this), its possible with an angled pinheader, like this one:
Image
Note that this is a ten pins header, and you need a eight pins header, (I could not find a similar picture of an eight-pins header) but generally you can clip off these headers to any length you want. Also note that if you connect the header top side it will have all connections mirrored, and for that reason Its a pity the drawing created is drawn from the top side, as this could cause confusion. If you publish such a picture you should mention it is mirrored in contrast to the official bottom side position.

DogEars
Posts: 44
Joined: Sun Jun 17, 2012 1:16 pm

Re: P5 Pinout partial information!

Fri Sep 14, 2012 9:18 pm

Is there such a thing as an 8-way ribbon type connector, I've tried looking, but can only find a Molex connector that has to have each pin individually crimped and inserted into a plastic housing.
Cheers G.

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Sat Sep 15, 2012 1:45 am

MattHawkinsUK wrote:I received my Rev 2 board and the first thing I did (after powering it up) was testing the P5 pins to work out how the GPIO connections were arranged.

Here is the results :

1 +5V
2 +3V3
3 GPIO28
4 GPIO29
5 GPIO30
6 GPIO31
7 Ground
8 Ground

Raspberry Pi P5 Header
http://www.raspberrypi-spy.co.uk/2012/0 ... p5-header/
Great work.

Can this information be publishd on the wiki, The current information is that pins 3 - 6 are "GPIO TBA". This needs to be updated with the correct information.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: P5 Pinout partial information!

Sat Sep 15, 2012 6:46 am

Done.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Sat Sep 15, 2012 7:52 am

MattHawkinsUK wrote:Done.
Just saw that. Great Work! :) What are the ALT functions though? Is that one for the foundation to release?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13370
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: P5 Pinout partial information!

Sat Sep 15, 2012 8:44 am

wallarug wrote:
MattHawkinsUK wrote:Done.
Just saw that. Great Work! :) What are the ALT functions though? Is that one for the foundation to release?
No, each generic I/O pin can fulfill several functions, which one function it fulfills is determined by software.
All generic I/O pins (note that not calling it a GPIO pin is intentional, to avoid confusion) default to a simple basic input/output pin, a pin that can be directly controlled, as an input pin, one that can be read out, to deliver a single binary value, or can be programmed as output that can be programmed high or low.

Depending on the exact pin number the pin can also be controlled by one or more specific I/O mechanisms, called an "alternative function". Such a mechanism can for example be a "UART", a "Universal Asynchronous Receiver/Transmitter". an electronic device that converts a parallel signal into an (asynchronous) serial bitstream, (Transmitter) and can convert such a bitstream back into a parallel signal. Its the basis for what you might know as the RS232 port.

Other mechanisms for example assists in interfacing to external devices such as those using the I2C (inter-IC-communication) interface, or the SPI (Serial Peripheral Interface bus) signal, or the I2S (inter-IC sound interface). A "PWM", (pulse width modulation) mechanism automatically outputs a pulse stream where the ratio between the signal being high and the signal being low can be controlled in software, but the software doesn't have to create a pulse stream itself (by toggling the output high and low in succession). This one can be used to control a servo, create a variable analog output level (by simply filtering the signal with a resistor and capacitor), or control a servomotor.

not every pin has the same mechanisms "behind it", but often you can choose from several alternatives (ALT functions) to the standard general purpose I/O function.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13370
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: P5 Pinout partial information!

Sat Sep 15, 2012 9:05 am

DogEars wrote:Is there such a thing as an 8-way ribbon type connector, I've tried looking, but can only find a Molex connector that has to have each pin individually crimped and inserted into a plastic housing.
Cheers G.
Yes:
Image

Look here (its just an example, you can buy them anywhere)
http://uk.farnell.com/fci/71600-008lf/c ... dp/2112407

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Sat Sep 15, 2012 9:53 am

mahjongg wrote:
wallarug wrote:
MattHawkinsUK wrote:Done.
Just saw that. Great Work! :) What are the ALT functions though? Is that one for the foundation to release?
No, each generic I/O pin can fulfill several functions, which one function it fulfills is determined by software.
All generic I/O pins (note that not calling it a GPIO pin is intentional, to avoid confusion) default to a simple basic input/output pin, a pin that can be directly controlled, as an input pin, one that can be read out, to deliver a single binary value, or can be programmed as output that can be programmed high or low.

Depending on the exact pin number the pin can also be controlled by one or more specific I/O mechanisms, called an "alternative function". Such a mechanism can for example be a "UART", a "Universal Asynchronous Receiver/Transmitter". an electronic device that converts a parallel signal into an (asynchronous) serial bitstream, (Transmitter) and can convert such a bitstream back into a parallel signal. Its the basis for what you might know as the RS232 port.

Other mechanisms for example assists in interfacing to external devices such as those using the I2C (inter-IC-communication) interface, or the SPI (Serial Peripheral Interface bus) signal, or the I2S (inter-IC sound interface). A "PWM", (pulse width modulation) mechanism automatically outputs a pulse stream where the ratio between the signal being high and the signal being low can be controlled in software, but the software doesn't have to create a pulse stream itself (by toggling the output high and low in succession). This one can be used to control a servo, create a variable analog output level (by simply filtering the signal with a resistor and capacitor), or control a servomotor.

not every pin has the same mechanisms "behind it", but often you can choose from several alternatives (ALT functions) to the standard general purpose I/O function.
I am aware of all of the above. But, some of the pins on P1 seem to have very specific ALT functions. From what your seem to be saying above, I can program the pins (through s/ware) to do whatever I want. I don't know if I am correct in saying that. Can you confirm this? I am new to hardware hacking and the such.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13370
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: P5 Pinout partial information!

Sat Sep 15, 2012 10:23 am

Sorry, I did not realise you were asking about the specific Alt-functions of the GPIO's on P5, and thus you simply triggered my "teaching mode".

No each SoC GPIO pin has its own dedicated set of alternate functions, all pins can do generic I/O, but not all can function as I2C port or as UART, only some specific pins have those specific alt-functions.

AFAIK the P5 pins specifically are suitable for an I2S interface. I think the original front page article gave some details.

lets see;
To utilise GPIO signals released by the removal of the version identification links, a new connector site P5 has been added. This carries the four GPIO signals [BCM2835/GPIO28 – BCM2835/GPIO31] named GPIO7 – GPIO10 respectively, along with +5V0, +3V3 and two 0V. Currently this connector is not populated.

This GPIO allocation provides access to one of:

SDA0, SCL0 (Operating independently of P1 SDA1, SCL1); or
PCM_CLK, PCM_FS, PCM_DIN, PCM_DOUT or I2S; or
Four GPIO signals.
This connector is intended to be a suitable attachment point for third-party clock and audio codec boards, and is pinned to be mounted (ideally) on the underside due to connector clash. Pin 1 is marked with the square pad (top left – looking from the top).


The document "BCM2835-ARM-Peripherals 06-53-23.pdf" gives details about the Alt functions of GPIO28 to 31 .

Code: Select all

GPIO#  ALT0       ALT1   ALT2     ALT3          ALT5
28     SDA0       SA5    PCM_CLK  <reserved>
29     SLC0       SA4    PCM_FS   <reserved>
30     <reserved> SA3    PCM_DIN  CTS0          CTS1
31     <reserved> SA2    PCM_DOUT RTS0          RTS1
Note that the ALT1 functions are useless (part of a databus interface, with SA2 being the third address line etc), and none of the ports has an ALT4 function.

So generally speaking, using ALT0 for ports 28 & 29 will give you I2C port #0 and simultaneously you can have hardware handshake lines for either UART0 or UART1 by using ALT5 for ports 30 &31. Note that because only complete (RXD & TXD) signals for only one of the two UARTs available are routed out, you can only have one complete serial port (but now one including hardware handshaking). One way to use the two UARTS available simultaneously through would be by having the transmitter running at a UART with different baud rate than the other UART for the receiver (known as "split speed", in the past mainly used with V.23 modems).

By using all ports with ALT2 settings you can have a complete I2S interface with clock, frame clock, data-in and data-out.

in fact the wiki should be updated to give this information also, in a table like that for P1.

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Sat Sep 15, 2012 11:02 am

I agree with the wiki being updated with this information.

Thanks for explaining that. Really helpful stuff. :D

User avatar
Grumpy Mike
Posts: 938
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: P5 Pinout partial information!

Tue Sep 18, 2012 10:37 am

I used the bent pin header that mahjongg posted. However there is not enough room to mount this on the top as S2 gets in the way of the pins let alone anything you plug into it. However it will mount on the underside giving an added depth of just a few mm to the board. Then I can mount things from the side. Here is a photograph of both P1 and P5 being used.
Attachments
DSCN0193s.jpg
DSCN0193s.jpg (45.45 KiB) Viewed 6909 times

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Tue Sep 25, 2012 2:57 am

Why can't you just use a vertical header? ie. all the headers would be in the same direction next to each other.

User avatar
Grumpy Mike
Posts: 938
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: P5 Pinout partial information!

Tue Sep 25, 2012 11:55 am

wallarug wrote:Why can't you just use a vertical header? ie. all the headers would be in the same direction next to each other.
On the top there is not enough room with the 26 way socket in place, if mounted underneath it makes the board deeper and if it is mounted on a board or in a box then you have to remove the board to add the socket.

I am only reporting what I found and what I did. However what ever works for you is good.

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Tue Sep 25, 2012 12:04 pm

Grumpy Mike wrote:
wallarug wrote:Why can't you just use a vertical header? ie. all the headers would be in the same direction next to each other.
On the top there is not enough room with the 26 way socket in place, if mounted underneath it makes the board deeper and if it is mounted on a board or in a box then you have to remove the board to add the socket.

I am only reporting what I found and what I did. However what ever works for you is good.
Did you test this situation? I don't have a Model B rev2 so I am just guessing, If you have tested then you are probably right.

User avatar
Grumpy Mike
Posts: 938
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: P5 Pinout partial information!

Tue Sep 25, 2012 12:06 pm

Did you test this situation?

Well I didn't solder the header into the top of the board but when I put it in the holes and offered up the connectors they looked too tight to me. That is why I went with the solution I did.

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Tue Sep 25, 2012 12:10 pm

Grumpy Mike wrote:
Did you test this situation?

Well I didn't solder the header into the top of the board but when I put it in the holes and offered up the connectors they looked too tight to me. That is why I went with the solution I did.
ok.

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: P5 Pinout partial information!

Wed Sep 26, 2012 8:42 am

Is there any way that I can get a second PWM channel on the Raspberry Pi out of the P5 header? say on GPIO28 and GPIO29?

I was told that the only other one on the RPi rev1 was on Pins 3 and 5 on the SDA0 and SCL0 Channels repectively...But the wiki seems to state that:
Pin 3 (SDA0) and Pin 5 (SCL0) are preset to be used as an I²C interface. So there are 1.8 kilohm pulls up resistors on the board for these pins.[9]

Pin 12 supports PWM.
Can some explain SDA and SCL channels to me...I am confused. :?

User avatar
Grumpy Mike
Posts: 938
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: P5 Pinout partial information!

Wed Sep 26, 2012 2:00 pm

Can some explain SDA and SCL channels to me
These are the two signals Serial DAta and Serial CLock that are used in the I2C interface. Nothing to do with the PWM.

GPIO 18 can be assigned to be PWM0, the other PWM output, PWM1, can be assigned on the following pins:-
GPIO 13
GPIO 19
GPIO 41
GPIO 45
None of which are brought out on P1 or P5 of the issue 2 Pi.

Return to “Interfacing (DSI, CSI, I2C, etc.)”