Hardware Reference
In-Depth Information
Chapter 10
GPIO
General-purpose I/O is a topic near to the hearts of Raspberry Pi owners, because this is
the interface to the outside world. The BCM2835 is flexibly designed to allow I/O pins to
be reconfigured under software control. GPIO 14 can be an input, an output, or operate as
a serial port TX data line, for example. This makes the Raspberry Pi very adaptable.
One of the challenges related to the Pi's GPIO interface is that it uses a weak CMOS
3 V interface. The GPIO pins are susceptible to static electricity damage, and the I/O pins
are weak drivers (2 to 16 mA). Additionally, GPIO power must be budgeted from the total
spare current capacity of 50 mA. Using adapter boards overcomes these problems but
adds considerably to the cost. This then provides a fertile area for coming up with cheap
and effective roll-your-own solutions.
Pins and Designations
Figures 12-1 and 12-2 show the schematic GPIO connections for the Raspberry Pi. You
will notice that the GPIO pins are also designated with the GEN x designation. (Gen 7 to
10 was not available prior to version 2.) This may have been an early attempt to follow the
Arduino lead of naming their pins digital0 or analog4, for example, in a generic way. It
appears, however, that this naming convention has not really caught on among Pi users.
Despite this, these names are cross-referenced in Table 10-1 . These are probably the
preferred first choices when shopping for GPIO pins to use, since they are less likely to be
required for special (alternate) functions like UART or SPI.
Table 10-1. Rev 2.0 GEN and GPIO Designations
GEN x
GPIO y
Header
GEN x
GPIO y
Header
GEN0
GPIO 17
P1-11
GEN6
GPIO 25
P1-22
GEN1
GPIO 18
P1-12
GEN7
GPIO 28
P5-03
GEN2
GPIO 27
P1-13
GEN8
GPIO 29
P5-04
GEN3
GPIO 22
P1-15
GEN9
GPIO 30
P5-05
GEN4
GPIO 23
P1-16
GEN10
GPIO 31
P5-06
GEN5
GPIO 24
P1-18
 
 
Search WWH ::




Custom Search