Difference between revisions of "GPIO Pinout"

From HiveTool
Jump to: navigation, search
(GPIO ordered by Header Pins)
(GPIO ordered by Signal Name)
Line 212: Line 212:
  
 
==GPIO ordered by Signal Name==
 
==GPIO ordered by Signal Name==
+
<table  border=1>
+
       <th>Signal</th><th>Alt Function</th><th>J8</th><th>H1</th><th>H5</th>
      <table  border=1>
+
       <tr><td bgcolor="orange">3.3 VDC Power</td><td></td><td>1</td><td>1</td><td></td></tr>
       <th>Signal</th><th>J8</th>
+
       <tr><td bgcolor="orange">3.3 VDC Power</td><td></td><td>17</td><td>17</td><td></td></tr>
       <tr><td bgcolor="orange">3.3 VDC Power</td><td>1</td></tr>
+
       <tr><td bgcolor="red">5 VDC Power</td><td></td><td>2</td><td>2</td><td></td></tr>
      <tr><td bgcolor="orange">3.3 VDC Power</td><td>17</td></tr>
+
       <tr><td bgcolor="red">5 VDC Power</td><td></td><td>4</td><td>4</td><td></td></tr>
       <tr><td bgcolor="red">5 VDC Power</td><td>2</td></tr>
+
       <tr><td bgcolor="yellow">GPIO 2</td><td><b>I2C</b></td><td>3</td><td>3</td><td></td></tr>
      <tr><td bgcolor="red">5 VDC Power</td><td>4</td></tr>
+
       <tr><td bgcolor="yellow">GPIO 3</td><td><b>I2C</b></td><td>5</td><td>5</td><td></td></tr>
       <tr><td bgcolor="yellow">GPIO 2 <b>I2C</b></td><td>3</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 4</td><td></td><td>7</td><td>7</td><td></td></tr>
      <tr><td bgcolor="yellow">GPIO 3 <b>I2C</b></td><td>5</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 5</td><td></td><td>29</td><td></td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 4</td><td>7</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 6</td><td></td><td>31</td><td></td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 5</td><td>29</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 7</td><td><b>SPIO CE1</b></td><td>26</td><td>26</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 6</td><td>31</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 8</td><td><b>SPIO CE0</b></td><td>24</td><td>24</td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 7</td><td>26</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 9 </td><td><b>SPIO MISO</b></td><td>21</td><td>21</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 8</td><td>24</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 10</td><td><b>SPIO MOSI</b></td><td>19</td><td>19</td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 9 <b>SPIO MISO</b></td><td>21</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 11</td><td><b>SPIO SCLK</b></td><td>23</td><td>23</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 10 <b>SPIO MOSI</b></td><td>19</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 12</td><td><b>PWM</b></td><td>32</td><td></td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 11 <b>SPIO SCLK</b></td><td>23</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 13</td><td></td><td>33</td><td></td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 12 <b>PWM</b></td><td>32</td></tr>
+
       <tr><td bgcolor="blue">GPIO 14</td><td><b>TXD</b></td><td>8</td><td>8</td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 13</td><td>33</td></tr>
+
       <tr><td bgcolor="blue">GPIO 15</td><td><b>RXD</b></td><td>10</td><td>10</td><td></td></tr>
       <tr><td bgcolor="blue">GPIO 14 <b>TXDO</b></td><td>8</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 16</td><td></td><td>36</td><td></td><td></td></tr>
      <tr><td bgcolor="blue">GPIO 15 <b>RXDO</b></td><td>10</td></tr>
+
       <tr><td bgcolor="#cceecc">GPIO 17</td><td></td><td>11</td><td>11</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 16</td><td>36</td></tr>
+
       <tr><td bgcolor="purple">GPIO 18</td><td><b>PCM_CLK</b></td><td>12</td><td>12</td><td></td></tr>
      <tr><td bgcolor="#cceecc">GPIO 17</td><td>11</td></tr>
+
       <tr><td bgcolor="purple">GPIO 19</td><td><b>PCM_FS</b></td><td>35</td><td></td><td></td></tr>
       <tr><td bgcolor="purple">GPIO 18 <b>PCM_CLK</b></td><td>12</td></tr>
+
      <tr><td bgcolor="purple">GPIO 20</td><td><b>PCM_DIN</b></td><td>38</td><td></td><td></td></tr>
      <tr><td bgcolor="purple">GPIO 19 <b>PCM_FS</b></td><td>35</td></tr>
+
      <tr><td bgcolor="purple">GPIO 21</td><td><b>PCM DOUT</b></td><td>40</td><td></td><td></td></tr>
      <tr><td bgcolor="purple">GPIO 20 <b>PCM_DIN</b></td><td>38</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 22</td><td></td><td>15</td><td>15</td><td></td></tr>
       <tr><td bgcolor="purple">GPIO 21 <b>PCM DOUT</b></td><td>40</td></tr>
+
      <tr><td bgcolor="green">GPIO 23</td><td></td><td>16</td><td>16</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 22</td><td>15</td></tr>
+
      <tr><td bgcolor="green">GPIO 24</td><td></td><td>18</td><td>18</td><td></td></tr>
      <tr><td bgcolor="green">GPIO 23</td><td>16</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 25</td><td></td><td>22</td><td>22</td><td></td></tr>
       <tr><td bgcolor="green">GPIO 24</td><td>18</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 26</td><td></td><td>37</td><td></td><td></td></tr>
      <tr><td bgcolor="cceecc">GPIO 25</td><td>22</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 27</td><td></td><td>13</td><td>13</td><td></td></tr>
       <tr><td bgcolor="#cceecc">GPIO 26</td><td>37</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 28</td><td>I2C0_SDA</td><td></td><td></td><td>3</td></tr>
      <tr><td bgcolor="#cceecc">GPIO 27</td><td>13</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 29</td><td>I2C0_SCL</td><td></td><td></td><td>4</td></tr>
       <tr><td bgcolor="#cceecc">I2C EEPROM ID_SD</td><td>27</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 30</td><td></td><td></td><td></td><td>5</td></tr>
      <tr><td bgcolor="#cceecc">I2C EEPROM ID_SC</td><td>28</td></tr>
+
      <tr><td bgcolor="#cceecc">GPIO 31</td><td></td><td></td><td></td><td>6</td></tr>
       <tr><td bgcolor="#555555">Ground</td><td>6</td></tr>
+
      <tr><td bgcolor="#cceecc">I2C EEPROM ID_SD</td><td></td><td>27</td><td></td><td></td></tr>
      <tr><td bgcolor="#555555">Ground</td><td>9</td></tr>
+
      <tr><td bgcolor="#cceecc">I2C EEPROM ID_SC</td><td></td><td>28</td><td></td><td></td></tr>
       <tr><td bgcolor="#555555">Ground</td><td>14</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>6</td><td>6</td><td></td></tr>
      <tr><td bgcolor="#555555">Ground</td><td>20</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>9</td><td>9</td><td></td></tr>
       <tr><td bgcolor="#555555">Ground</td><td>25</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>14</td><td>14</td><td></td></tr>
      <tr><td bgcolor="#555555">Ground</td><td>30</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>20</td><td>20</td><td></td></tr>
       <tr><td bgcolor="#555555">Ground</td><td>34</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>25</td><td>25</td><td></td></tr>
      <tr><td bgcolor="#555555">Ground</td><td>39</td></tr>
+
      <tr><td bgcolor="#555555">Ground</td><td></td><td>30</td><td></td><td></td></tr>
 +
      <tr><td bgcolor="#555555">Ground</td><td></td><td>34</td><td></td><td></td></tr>
 +
      <tr><td bgcolor="#555555">Ground</td><td></td><td>39</td><td></td><td></td></tr>
 
       </table>
 
       </table>

Revision as of 04:04, 22 January 2015

General Purpose Input Output (GPIO)

Resources:

  1. eLinux.org RPi Low-level peripherals

Notes:

  1. GPIO pins are 3.3 volt logic levels and are not tolerant of 5V levels
  2. GPIO properties can be set as a block (GPIO pins 0-27 are in the same block) not per pin.
    1. Can interrupt based on high/low/rise/fall/change.
    2. Input hysteresis (Schmitt trigger) can be on or off,
    3. Output slew rate can be fast or limited, and
    4. Source and sink currents are configurable from 2 mA up to 16 mA.

Color Legend

Color Legend
3.3 VDC PowerSerial Console/Power
5 VDC PowerHX711 Scale
GroundI2C Sensors
UnusedI2S Audio



GPIO ordered by Header Pins

The first 26 pins on J8 (A+ and B+ models) are the same as H1 on the A and B models.

Hivetool use
Reserved for I2C Sensors
Reserved for I2C Sensors
Reserved for I2C Sensors
Unused
Reserved for I2C Sensors
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Reserved I2S
Unused
Unused
Raspberry Pi
3.3 VDC Power
GPIO 2 I2C
GPIO 3 I2C
GPIO 4
Ground
GPIO 17
GPIO 27
GPIO 22
3.3 VDC Power
GPIO 10 SPIO MOSI
GPIO  9 SPIO MISO
GPIO 11 SPIO SCLK
Ground
I2C EEPROM ID_SD
GPIO 5
GPIO 6
GPIO 13
GPIO 19 PCM_FS
GPIO 26
Ground
J8
12
34
56
78
910
1112
1314
1516
1718
1920
2122
2324
2526
2728
2930
3132
3334
3536
3738
3940
Raspberry Pi
5 VDC Power
5 VDC Power
Ground
GPIO 14 TXDO
GPIO 15 RXDO
GPIO 18 PCM_CLK
Ground
GPIO 23
GPIO 24
Ground
GPIO 25
GPIO 8
GPIO 7
I2C EEPROM ID_SC
Ground
GPIO 12 PWM
Ground
GPIO 16
GPIO 20 PCM_DIN
GPIO 21 PCM DOUT
Hivetool use
Reserved Power HX711
Reserved Power
Reserved Ground
Reserved serial console
Reserved serial console
Reserved I2S
Unused
Reserved HX711
Reserved HX711
Reserved HX711
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Unused
Reserved I2S
Reserved I2S


H5 is only on the A and B models. GPIO 28-31 are not available on the + models. These signals should probably not be used.

Hivetool
Unused
Unused
Unused
Unused
R Pi
5 VDC Power
GPIO 28
GPIO 30
Ground
H5
12
34
56
78
R Pi
3.3 VDC Power
GPIO 29
GPIO 31
Ground
Hivetool
Unused
Unused
Unused
Unused



GPIO ordered by Signal Name

SignalAlt FunctionJ8H1H5
3.3 VDC Power11
3.3 VDC Power1717
5 VDC Power22
5 VDC Power44
GPIO 2I2C33
GPIO 3I2C55
GPIO 477
GPIO 529
GPIO 631
GPIO 7SPIO CE12626
GPIO 8SPIO CE02424
GPIO 9 SPIO MISO2121
GPIO 10SPIO MOSI1919
GPIO 11SPIO SCLK2323
GPIO 12PWM32
GPIO 1333
GPIO 14TXD88
GPIO 15RXD1010
GPIO 1636
GPIO 171111
GPIO 18PCM_CLK1212
GPIO 19PCM_FS35
GPIO 20PCM_DIN38
GPIO 21PCM DOUT40
GPIO 221515
GPIO 231616
GPIO 241818
GPIO 252222
GPIO 2637
GPIO 271313
GPIO 28I2C0_SDA3
GPIO 29I2C0_SCL4
GPIO 305
GPIO 316
I2C EEPROM ID_SD27
I2C EEPROM ID_SC28
Ground66
Ground99
Ground1414
Ground2020
Ground2525
Ground30
Ground34
Ground39