Zonker's RS-232 Information Page
http://www.conserver.com/consoles/Clues/rs232.html
(updated:
Nov 06, 2005, 10:32 pm)
Table of Contents
Basic Terminology
DTE and DCE Signals
RS-232-C and EIA-232
Cable Clues
Protocol Analyzer Software & Tools
Author Credits
DTE and DCE
- Legacy terms, that described the 'type of interface'
- These terms also defined which pins could be expected
to be "transmitters" (outputs)
- Outputs are also called "Transmitters" or
"Drivers"
- Inputs are also called "Receivers"
- Data Terminal Equipment (DTE)
- typically hosts, terminals
- Data Communications Equipment (DCE)
- typically modems, printers
|
Data Signals (TD and RD)
- These two wires (plus Signal Ground) are
needed to pass two-way data between devices
- Transmit Data (TD), is an output on DTE devices,
and an input on DCE devices
- Receive Data (RD), is an input on
DTE devices, and an output on DCE
devices
(Rarely, a vendor gets these backwards, so I always use a
signal tracer to be sure.)
|
Flow Control Signals (RTS and CTS)
- Signal leads used by devices to stop and start data
flow on the 'other' device.
- Referred to as "Hardware Flow Control", versus
Software Flow Control (XON/XOFF).
- Request To Send (RTS) is how DTE tells the DCE
device to start/stop.
- Clear To Send (CTS) is how DCE tells the DTE
device to start/stop.
- If you plan to use "Protocol Communications" on the
serial connection, you will need to turn. Software Flow
Control off, and turn Hardware Flow Control
on.
- This includes SLIP and PPP, as well as
XMODEM/YMODEM/ZMODEM transfers.
- This is because packet numbers can look like the
XOFF character, and they can freeze your session by
stopping communications, with no way to restart it!
|
Handshaking Signals (DTR, DSR, DCD)
- Signal leads used to the other' device when it is
powered and ready (versus flow control)
- Data Terminal Ready (DTR) used by DTE device
to tell DCE device it is ready
- Data Set Ready (DSR) used by DCE device to
tell DTE device it is ready
- Data Carrier Detect (DCD) used by modems (DTE
device) to tell DCE device a call is on-line
|
The RS-232 standards outline certain signal leads,
with their common designations, should appear on specific
pins of the DB-25 connector. These common
designations appear below. The normal signals used for
asynchronous serial communications are shown in
boldface (pins 2, 3, 4,
5, 6, 7, 8, and 20).
Pin
|
Signal
|
DTE
|
DCE
|
1
|
Chassis Ground
|
-
|
-
|
2
|
Tx Data (TD)
|
output
|
input
|
3
|
Rx Data (RD)
|
input
|
output
|
4
|
Request To Send (RTS)
|
output
|
input
|
5
|
Clear To Send (CTS)
|
input
|
output
|
6
|
Data Set Ready (DSR)
|
input
|
output
|
7
|
Signal Ground
|
-
|
-
|
8
|
Carrier Detect (DCD)
|
input
|
output
|
9
|
positive test voltage (loop)
|
-
|
output
|
10
|
negative test voltage (loop)
|
-
|
output
|
11
|
not assigned
|
x
|
x
|
12
|
Secondary DCD (SDCD)
|
input
|
output
|
13
|
Secondary CTS (SCTS)
|
input
|
output
|
14
|
Secondary Tx Data (STD)
|
output
|
input
|
15
|
Transmitter Clock (TC)
|
input
|
output
|
16
|
Secondary RD (SRD)
|
input
|
output
|
17
|
Receiver Clock (RC)
|
input
|
output
|
18
|
Local Loopback
|
output
|
input
|
19
|
Secondary RTS (SRTS)
|
output
|
input
|
20
|
Data Terminal Ready (DTR)
|
output
|
input
|
21
|
Signal Quality Detect (SQ)
|
input
|
output
|
22
|
Ring Indicator (RI)
|
input
|
output
|
23
|
Data Rate Selector (DRS)
|
either
|
either
|
24
|
External Transmitter Clock (XTC)
|
output
|
input
|
25
|
Test Mode (TM)
|
input
|
output
|
Note 1: Basic data connections only require
three leads: TD,
RD, and Signal
Ground.
Note 2: Modem connections also require:
CTS, RTS,
DSR, DTR,
DCD.
|
Serial communications standards, both specifying
mechanical and electrical information, and both represent
one of the most common asynchronous serial standards today.
Some of the specifications from these standards are;
- +21V = logic '1', -21V = logic '0'.
- Some devices use +5V / -5V signaling .
- Between +3V to -3V = "No Man's Land" .
- (long cables deplete the signals, giving
unreliable output)
- 50' length maximum between devices .
- (though folks often exceed this...successfully)
- Devices with +5V / -5V signaling have trouble
using long cable runs!
- DB-25 Connector Pinouts .
- (IBM developed the de facto DB-9 standard for the
PC-AT)
|
The RS-232 specification called for no more than 50 feet. However,
I've had success with much greater distances in the past, depending
on the devices being connected (driver voltages), cable length, cable
type, shielded or not, etc.
- The higher the speed, the shorter the maximum cable length.
The DigiCorp folks have posted a
note on their support pages that recommends that the cable length be
no more than 2500 picofarad in capacitance, where each
connector has a 'cost' of 100 pf, and then you need to find out how
many picofarads-per-foot your cabling is rated. More info is
available on their
Tech
Support Specifications Page. Your mileage may vary. Older
Macintosh computers had lower voltages (~6-9v) than the RS-232
specification (~25v), and as a result, their range seems shorter to
me.
Twisted Pair cable can help extend the range (and often has a
lower capacitance...hmmm...), but the twists don't often help reduce
line noise, because the various vendors use different RJ-45 wiring
schemes. As a result, You often have your most susceptible leads
(data) twisted together, versus twisted with a fairly static signal
(like ground, or handshaking leads).
Shielded cable can help reduce noise, but the cost is higher than
for normal CAT-5. You can usually achieve good noise isolation if you
pay attention to WHERE your cables are placed. Avoid laying data
cables parallel with AC power cables, or laying on/near transformers
or fluorescent lighting ballasts (both are strong sources of
electromagnetic radiation).
Protocol Analyzer Software & Tools
|
|
Serial Protocol Analyzer Programs
Serial Protocol Analyzer Tools/Devices
NOTICE: Most of the pages,
articles, and tutorials on this website are
copyrighted works. You may make 'deep links' to various
pages. (If you let me know which page(s) you are linking to,
I'll let you know if I move the page(s) during updates.)
Please send me email if you wish to republish any material,
or use it on your own website.
|
Copyright 1996-2006,
David K. Z.
Harris, N6UOW
Questions? Comments? Additions? Email consoles at
conserver.com.
(Don't harvest my address, I don't want
SPAM!)
How does he do it? And
Why?