I RNTESRFAC-I2NG S3TAND2ARDS:
by Gerard Fonte
These days, there are various common interfaces available.
Choosing the best interface is not always trivial. Do you need
an interface to store data or to control your robot?
We will be concentrating on the
hardware aspects rather than
the software, since this is usually the greatest problem for hobbyists.
The main goal of this article is to provide enough basic information to allow
the reader to successfully interconnect
their own designs to a computer via
the interface. However, there is a secondary goal as well, namely, to show
how interfaces, in general, work. It will
be seen that while there are dozens of
interfaces, there are a few basic
concepts that are repeated. Once
these are understood, any interfacing
design becomes a fairly straightforward
process. What’s more, you will be able
to design your own custom interfaces
that precisely suit your needs.
There are four general classes of
interfaces based on two characteristics,
as shown in Table 1. The first characteristic is whether the data is transferred
on a single line (serial interface) or multiple lines (parallel interface). RS-232,
USB (Universal Serial Bus), Firewire,
and all wireless interfaces are serial.
Centronics (printer interface), SCSI
TABLE 1. Basic categories of interface
types. There are many other features
and classes, but this breakdown is
arguably the most fundamental.
(Small Computer System Interface), ISA
(Industry Standard Architecture), and
HP-IB (Hewlett Packard Interface Bus
or IEEE-488) are parallel interfaces.
The second characteristic is
whether the interface is a hardware or
system interface. These names are
functional descriptions rather than
technical attributes, and some
interfaces can actually fit in both
categories. A hardware interface is
very straightforward. All that you need
to do is provide the proper timing, and
the interface works. RS-232 and ISA
are hardware interfaces.
System interfaces are different.
They require both a hardware interface
and a command interface, which usually means significant software (read
computer) at the interface. A typical
system interface is the HP-IB. There are
only eight data lines and eight control
lines (which is less complex than a
printer interface). But the HP-IB interface has to understand commands sent
on those lines. At the least, you have to
recognize when incoming signals are
commands. Otherwise, you will read
commands as data and will get really
fouled up. Additionally, with system
interfaces, there are often multiple
devices connected to a single interface. This adds another level of complexity because you will have to be
sure the interface is talking to you and
not someone else.
will have to have
some means to
determine if the
interface is ready to
listen when you talk.
The problem of two devices talking at
the same time is not always easy to
solve. Some system interfaces are
extremely complex and require a serious computer at the interface. Bluetooth
is such an interface. Other system interfaces are easier to work with. USB is
much easier than Bluetooth but it is still
much more complicated that RS-232.
Firewire, Bluetooth, USB
Knowing some of the history of
RS-232 and how it developed helps in
understanding some of its characteristics. The first interface that enjoyed
widespread use was the Baudot code.
It was used by Western Union for their
teletypes, which were the most
common method of sending data
(telegrams) by wire until the mid 20th
century. This was a five-bit code that
connected one teletype directly to
another teletype. These machines
were not electronic, they were
completely mechanical. The surprising
thing was that they actually worked
fairly well, although slowly. They could
operate at about five characters per
second (roughly 60 words per minute).
This is slower than a good typist, but a
teletype could work 24 hours a day.
Five bits ( 32 different combinations) cannot directly incorporate all
the letters, numbers, and punctuation
of the English language. If they used 26
codes for the letters, they would have
six codes left over. They created two
different sets of 26 characters. One for
letters and another for numbers, punctuation, and other miscellaneous
symbols. Then they used two of the