Hardware Reference
In-Depth Information
The following hardware is required to complete the activities and examples
presented in this chapter:
Arduino Uno
USB Cable
The code download for this chapter is found at http://www.wiley.com/go/
arduinosketches on the Download Code tab. The code is in the Chapter 5 folder
and the i lename is chapter5.ino .
Introducing Serial Communication
The original IBM PC, introduced in 1981, came with two serial ports, physical
connectors allowing the computer to connect to devices or another computer
via the RS-232 protocol. For most people, this was the beginning of the serial
port, but in reality, it started much earlier. Early computers had serial ports, and
they have even been used on mainframes. They have been in use almost since
the beginning of microprocessor-based computers.
The word serial comes from the way data is transmitted; serial devices send
bits one at a time on a single wire. This is something that you have seen before;
it is like a telephone call. Both users pick up the telephone and a single wire con-
nects them together. Both users can talk at the same time (even if it is considered
polite to listen while the other person talks), and words are sent one at a time.
Both sides are free to start talking when they want, and also free to stop talking.
While serial devices send bits on a single wire, parallel devices send multiple
bits on multiple wires. Although parallel communications can be faster than
serial, they were often more expensive, requiring more wires. There are also
speed limitations due to physical limitations of conductive wiring. Figure 5-1
shows the difference between serial and parallel communications.
A new standard was born: RS-232. RS-232 serial ports were a standard feature
on computers allowing users to connect mice, modems, and other peripherals
using a common connector. These connectors allowed computers to talk with
peripherals, and even talk with other computers. Software was designed to send
data between computers on serial links, but while RS-232 was fast enough for
devices like mice and modems, it became too slow to handle large amounts of
data.
The original serial ports have been removed from most modern computers
in favor of a new standard: USB. USB is short for Universal Serial Bus, and even
that, however advanced it may be, still uses the same principle: sending data
through a serial line. USB does not use RS-232, instead it uses new techniques
to send data serially. It can, however, connect to RS-232 hardware using a spe-
cial converter, which is required when a computer does not have RS-232 but
 
Search WWH ::




Custom Search