Information Technology Reference
In-Depth Information
13
RS-232
13.1 Introduction
RS-232 is one of the most widely used techniques used to interface external equipment to
computers. It uses serial communications where one bit is sent along a line, at a time. This
differs from parallel communications which send one or more bytes, at a time. The main ad-
vantage that serial communications has over parallel communications is that a single wire is
needed to transmit and another to receive. RS-232 is a de facto standard that most computer
and instrumentation companies comply with. It was standardised in 1962 by the Electronics
Industries Association (EIA). Unfortunately this standard only allows short cable runs with
low bit rates. The standard RS-232 only allows a bit rate of 19 600 bps for a maximum dis-
tance of 20 m. New serial communications standards, such as RS-422 and RS-449, allow
very long cable runs and high bit rates. For example, RS-422 allows a bit rate of up to
10 Mbps over distances up to 1 mile, using twisted-pair, coaxial cable or optical fibres. The
new standards can also be used to create computer networks. This chapter introduces the RS-
232 standard and gives simple programs which can be used to transmit and receive using RS-
232.
13.2 Electrical characteristics
13.2.1 Line voltages
The electrical characteristics of RS-232 defines the minimum and maximum voltages of a
logic '1' and '0'. A logic '1' ranges from -3 V to -25 V, but will typically be around -12 V.
A logical '0' ranges from 3 V to 25 V, but will typically be around +12 V. Any voltage be-
tween -3 V and +3 V has an indeterminate logical state. If no pulses are present on the line
the voltage level is equivalent to a high level, that is -12 V. A voltage level of 0 V at the re-
ceiver is interpreted as a line break or a short circuit. Figure 13.1 shows an example trans-
mission.
+12V
-12V
0
1
0
0
1
1
0
Inactive condition
Figure 13.1
RS-232 voltage levels
Search WWH ::




Custom Search