Hardware Reference
In-Depth Information
Discussion
Trying to determine which connection option to use can sometimes be tricky and often re-
quires you to read the sensor datasheet. The names of the individual signals can give you
some clues, but you should take care to note the sensor's voltage and current requirements,
as well as input or output mode, to avoid damaging either the Bone or the sensor. An active
sensor will require power and ground connections, whereas a passive sensor will alter an
electrical property of its own, such as resistance, based on what it senses.
The digital I/O pins are very flexible. Each can be configured to have an internal pull-up or
pull-down resistor (I'll explain what these are shortly) and support up to eight different ma-
jor modes of operation. Each supports a GPIO mode, in which they can simply output a 0
or 3.3 V level or input a 0 or 3.3 V level as a 0 or 1. Any digital I/O pin in GPIO mode can
generate an interrupt upon transitioning from one level to the other. Some of the other ma-
jor modes, including eight of the digital I/O pins, can be configured to generate a pulse
width modulated (PWM) signal with a frequency below once per second or above 25 MHz.
There are UARTS for serial I/O and a couple of I 2 C and SPI ports.
The seven analog input pins do not change modes and always read an analog voltage
between 0 and 1.8 V. They also include a reference ground and 1.8 V for use with your cir-
cuits.
WARNING
Keep in mind that some off-the-shelf capes ( Chapter 9 ) might use different pins, such as the
BB View LCD cape , which uses some of these analog inputs for the touch screen and many
I/Os to interface to the display.
For many sensors, the simplest solution might be to connect an off-the-shelf commercial
USB sensor, such as a USB microphone. The Bone supports many USB devices, as long as
a Linux driver is available. If you are cost sensitive and not into writing Linux device
drivers, it is best to search the Web to find out if your USB device is supported before you
buy it.
Recipes in this chapter not using a simple USB-connected peripheral are built around a
breadboard ( Recipe 1.5 ). The sensor is plugged in to the breadboard or used with a break-
Search WWH ::




Custom Search