Difference between revisions of "Raspberry Pi Interfacing"
Chris Tyler (talk | contribs) (→Available Interfaces) |
Chris Tyler (talk | contribs) (→Precautions) |
||
Line 24: | Line 24: | ||
== Precautions == | == Precautions == | ||
− | The BCM2835 is directly connected to signals present on the GPIO connector. Therefore, when you connect to the GPIO pin header, you are directly attaching to the SOC, and an | + | The BCM2835 is directly connected to signals present on the GPIO connector. Therefore, when you connect to the GPIO pin header, you are directly attaching to the SOC, and an over-voltage or over-current condition can seriously and irreversibly damage or destroy the SOC and render the Raspberry Pi useless. |
− | + | Two conditions lead to disastrous consequences; | |
− | # Grounding a pin which is expected to be an input when it is configured as | + | # Grounding a pin which is expected to be an input when it is configured as a high output (3.3 volts, often written as 3v3), either through the GPIO configuration or the PinMux configuration. This will cause a large current flow, probably damaging the Raspberry Pi. Likewise, connecting a pint which is expected to be an input to 3v3 when it is configured as a low output (0v) will have a similar effect. |
+ | # Connecting any pin to a voltage greater than 3v3 or less than 0v. | ||
+ | |||
+ | To fully protect a pin, attach a moderate resistance (220+ ohms) and a reversed zener diode to ground rated just above 3v3. | ||
+ | |||
+ | It is also important to protect the Pi against: | ||
+ | # [http://en.wikipedia.org/wiki/Electrostatic_discharge Electrostatic discharge] (however, it should be noted that the Pi is reasonably ESD-tolerant) | ||
+ | # Excessive current draw (including total current drawn by all attached devices) | ||
+ | # Over/under-voltage from the power supply |
Revision as of 23:49, 25 September 2012
Available Interfaces
The Raspberry Pi (model B, revision 1 or 2) is equipped with these standard interfaces:
- USB 2.0 (x2)
- 10 or 100 Mbps ethernet on twisted pair
- HDMI at up to 1080p30 resolution (1920x1080, progressive scan, 30 frames/second). Note that DVI-D and HDMI are equivalent except for the connectors and the inclusion of sound in HDMI - therefore, the Pi can be connected to a DVI monitor with the appropriate HDMI to DVI-D cables and/or adapters.
- Composite video (NTSC/NTSC-J or PAL/PAL-M format). This output can be used to drive older video monitors, or small composite LCD displays.
- Analog stereo audio (on a 3.5 mm (1/8") TRS jack).
- Pin header exposing GPIO, SPI, I2C, serial, and (in board revision 2) JTAG. All of these signals are provided at TTL 3v3 (+3.3 volts DC (VDC) +/-10% for a logical "high" or "1", 0 VDC for a logical "low" or "0"). A +5 VDC supply is also provided.
- CSI - Camera serial interface. The connector accepts a [fttp://en.wikipedia.org/wiki/Flexible_flat_cable flexible flat cable].
- DSI - Display serial interface, for connection to a small LCD panel or similar interface. The connector accepts a [fttp://en.wikipedia.org/wiki/Flexible_flat_cable flexible flat cable].
For custom-designed devices, the GPIO pin headers (and sometimes the audio output and/or USB connections) are usually used.
PinMux
The Broadcom BCM2835 system-on-a-chip used in the Raspberry Pi, like other SOCs, uses pin multiplexing (pinmux) to select which signals will be present on the pins/balls of the chip. This is done because the number of available signals exceeds the number of available pins.
Precautions
The BCM2835 is directly connected to signals present on the GPIO connector. Therefore, when you connect to the GPIO pin header, you are directly attaching to the SOC, and an over-voltage or over-current condition can seriously and irreversibly damage or destroy the SOC and render the Raspberry Pi useless.
Two conditions lead to disastrous consequences;
- Grounding a pin which is expected to be an input when it is configured as a high output (3.3 volts, often written as 3v3), either through the GPIO configuration or the PinMux configuration. This will cause a large current flow, probably damaging the Raspberry Pi. Likewise, connecting a pint which is expected to be an input to 3v3 when it is configured as a low output (0v) will have a similar effect.
- Connecting any pin to a voltage greater than 3v3 or less than 0v.
To fully protect a pin, attach a moderate resistance (220+ ohms) and a reversed zener diode to ground rated just above 3v3.
It is also important to protect the Pi against:
- Electrostatic discharge (however, it should be noted that the Pi is reasonably ESD-tolerant)
- Excessive current draw (including total current drawn by all attached devices)
- Over/under-voltage from the power supply