Hardware Reference
In-Depth Information
Although the Pi's GPIO port provides a 5 V power supply, tapped from the incoming power
on the micro-USB hub, on Pin 2, the Pi's internal workings are based on 3.3 V logic. This
means that the components on the Pi work from a 3.3 V power supply. If you're planning on
creating a circuit that will interface with the Pi through its GPIO port, make sure you are
using components compatible with 3.3 V logic or are passing the circuit through a voltage
regulator before it reaches the Pi.
Connecting a 5 V supply to any pin on the Raspberry Pi's GPIO port, or directly shorting either of
the power supply pins (Pin 1 and Pin 2) to any other pin will result in damage to the Pi. Because
the port is wired directly to pins on the Broadcom BCM2835 SoC processor, you will not be able
to repair any damage you do to it. Always be extra careful when working around the GPIO port.
WARNING
GPIO Features
The GPIO port provides eight pins for general-purpose use by default: Pin 7, Pin 11, Pin 12,
Pin 13, Pin 15, Pin 16, Pin 18 and Pin 22. These pins can be toggled between two states: high ,
where they are providing a positive voltage of 3.3 V; and low , where they are equal to ground
or 0 V. This equates to the 1 and 0 of binary logic, and can be used to turn other components
on or off. You'll learn more about this later in the chapter.
The Pi's internal logic operates at 3.3 V. This is in contrast to many common microcontroller
devices, such as the popular Arduino and its variants, which typically operate at 5 V. Devices
designed for the Arduino may not work with the Pi unless a level translator or optical isolator
is used between the two. Likewise, connecting pins on a 5 V microcontroller directly to the
Raspberry Pi's GPIO port will not work and may permanently damage the Pi.
WARNING
In addition to these general-purpose pins, the GPIO port has pins dedicated to particular
buses . These buses are described in the following subsections.
UART Serial Bus
he Universal Asynchronous Receiver/Transmitter (UART) serial bus provides a simple two-wire
serial interface. When a serial port is configured in the cmdline.txt file (as described in
Chapter 7, “Advanced Raspberry Pi Configuration”), it's this serial bus that is used as the port
for the messages. Connecting the Pi's UART serial bus to a device capable of displaying the
data will reveal messages from the Linux kernel. If you're having trouble getting the Pi to
boot, this can be a handy diagnostic tool—especially if nothing is showing on the display.
The UART serial bus can be accessed on Pins 8 and 10, with Pin 8 carrying the transmit signal
and Pin 10 carrying the receive signal. The speed can be set in the cmdline.txt file, and is
usually 115,200 bits per second (bps).
 
Search WWH ::




Custom Search