Hardware Reference
In-Depth Information
BCM Labeling
But another labeling system for the Raspberry Pi GPIO pins uses the channel numbers
on the Broadcom SOC. This system is referred to as the BCM system . It is the most
common system in use, especially because the GPIO pins are not completely inter-
changeable and they are wired differently between the various models and revisions
of the Raspberry Pi.
Table 1-6 shows the mappings of the BCM pin labels to the pins as shown in Figure 1-5
(for the Raspberry Pi Model B Revision 2, the current revision as of this writing).
Table 1-6. BCM pin labels (Raspberry Pi Model B revision 2)
5 V
5 V
GND
14 (TXD)
15 (RXD)
18
GND
23
24
GND
25
8
7
3.3 V
2 (SDA)
3 (SCL)
4
GND
17
27
22
3.3V
10 (MOSI)
9 (MISO)
11 (SCKL)
GND
Let's dig a little deeper. As you can see from the labeling, some of the pins are pre-
configured for special purposes. The pins marked as 3.3 V and 5 V are power pins,
with the voltage as labeled. The GND pins provide ground for wiring up circuits. BCM
Pins 2 (P1-03) and 3 (P1-05) are pre-setup to provide I2C bus 1. BCM Pins 14 (P1-08)
and 15 (P1-10) are configured to provide a serial console. BCM pin 18 (P1-12) supports
Pulse-Width Modulation (PWM).
For these reasons (and also because it is the most common Raspberry Pi GPIO la-
beling scheme used on the Internet), this topic uses the BCM pin labels.
We realize this might be confusing when you are wiring up devices to your Pi, but see
the next section for a clever way to help you remember what is what.
Label Your Own GPIO Pins
GPIO should be simple, but the common labeling scheme (BCM) is so confusing and
easy to forget. Here's a simple hack to make sure you always remember which pin
goes where.
Dr. Simon Monk had a problem: he wanted to wire all sorts of temporary connections
to his Raspberry Pi GPIO pins, but every time he wanted to do so, he had to go online
and look up the BCM pin labels. Then there was the task of counting down the pins to
find the right one, and while this sounds easy, trust us, you'll likely get this wrong just
as he did.
 
Search WWH ::




Custom Search