Hardware Reference
In-Depth Information
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
he GPIO port provides seven pins for general-purpose use by default: Pin 11, Pin 12, Pin 13,
Pin 15, Pin 16, Pin 18 and Pin 22. Additionally, Pin 7—while defaulting to providing a clock
signal for general purpose use—can also be used as a general-purpose pin, giving eight pins
in total. hese pins can be toggled between two states: high , where they are providing a posi-
tive voltage of 3.3 V; and low , where they are equal to ground or 0 V. his equates to the 1
and 0 of binary logic, and can be used to turn other components on or of. 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 l evel 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 . hese 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 conigured in the cmdline.txt ile (as described in
Chapter 6, “Coniguring the Raspberry Pi”), 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.
he 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. he speed can be set in the cmdline.txt ile, and is
usually 115,200 bits per second (bps).
 
Search WWH ::




Custom Search