This is only a preview of the November 1990 issue of Silicon Chip. You can view 61 of the 120 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
COMPUTER BITS
BY JENNIFER BONNITCHA
Computer cables and all that rot
Modem and serial cables bear a striking
resemblance to each other. How can you tell the
difference? What really is the difference
between serial and parallel printer cables? Why
do you need different cables for hard and
floppy disk drives? We'll answer these
questions and more as you read on.
The PC world is full of cables. Apart
from generating lots of paper, computers are really good at strangling
you with all types of cables - serial
and parallel printer cables, video
cables, keyboard cables , modem
cables, adaptor cables - the list goes
on and on. The sad fact is that unless
you use the correct cabfe for the job,
you can end up feeling very frustrated
with little to show for your effort.
Cables come in two basic varieties round and flat ribbon. That's pretty
trite but one thing is certain - your
computer won 't work properly unless all the appropriate cables are
correctly attached. A major problem
for many people is how to tell the
difference between the male and female ends of the cable.
The photo of Fig. l shows the differences. On the left is a male connector; it has pins in the centre while
the female connector on the right has
pin receptacles or sockets. The male
pins on a multiple-pin line plug are
Fig.1: this photo shows two 25-pin D plugs. The one at left is a male plug while
the one on the right is a female plug.
80
SILICON CHIP
connected with the appropriate fe male counterparts at the other end of
the cable to close a circuit. If you are
still confused, think of the typical
power outlet - the power plug is a
male connector while the power point
itself is a female socket.
Be aware also that many cables will
have the same type of connector at
each end, depending on the configuration of the computer and the device
you want to attach. So it is possible to
have a cable with a male plug at each
end. Once you understand the basics
of cables and connectors, you will
certainly feel more at home with your
computer.
Parallel cables
The parallel printer cable (also
known as a Centronics printer cable)
enables you to connect a standard
parallel printer to your computer. The
connection is made by a cable with a
multiple-pin plug at each end. The
most common is a 36-pin Centronics
plug at the printer end (named after
the American printer company that
pioneered this parallel interface) and
a 25-pin "D" type connector to the
computer end. The photo of Fig.2
shows these plugs for a typical printer
cable. Your computer will probably
have only one parallel port which
DOS knows as LPTl.
A parallel port has eight lines for
sending all the bits for one byte •Of
date simultaneously across eight
wires. This interface is fast and is
usually reserved for printers rather
than computer-to-computer communications. The main problem with
parallel ports is a limit on cable length
of about 4-5 metres.
Cables longer than this may require
amplification (signal buffering) to
reduce the risk of introducing errors
into the signal. Extender cables are
Fig.2: these are the connectors on a typical parallel
printer cable. The connector on the left is a 36-way
Centronics type while that on the right, which plugs into
the computer, is a 25-pin D type.
used to extend the length of an existing cable (funny
about that!) and usually have a female connector at one
end and a mating male connector at the other end. With
this type of cable, all wires are straight through as appropriate.
Generally extender cables are not recommended for
the parallel printer. However, I have used a 6-metre
cable with extender without any problems. You can try a
longer cable on your computer but remember - you have
been warned!
The parallel port of most PC, XT and AT computers is
unidirectional; that is, data will travel only one way,
from the computer to the port, to the parallel device. The
newer PS/2 computers have a bidirectional parallel port
which enables data to travel to or from the port. This
bidirectional capability is not currently used in most
applications. Future uses for the parallel port may include taking input from high speed data transfer devices
like scanners, bar code readers and video cameras.
Pin arrangements
Fig.3 shows the pin arrangement of the typical 36-pin
parallel connector socket. Note that the pins are numbered from right to left. Some early model computers
may have Centronics connections at both the system
unit and printer ends. When this is the case, the cable
often has the same male connectors at each end since
printers always have female connectors. In the case of
the Centronics connector, the female connector is a
18
1
(0----------0)
"o---------0)
38
19
Supported & Serviced Australia-wide by
Elmeasco Instruments Pty Ltd
N S W (02) 736 2888 Vic (03) 879 2322 Old (07) 875 1444
S.A. (08) 344 9000 W.A. (09) 470 1855
You've Gotta Getta Goldstar from :
A.C.T. John Pope Electrical806576N.S.W. D.G.E. Systems (049) 69 1625e W.FDixon (049)
Fig.3: this diagram shows how the pins are numbered on
a typical 36-pin Centronics socket. The pins on the
mating 36-pin plug are numbered from left to right. You
can see the numbers moulded in to the plastic, right next
to the four outside pins.
69 5t 77 • Macelec (042) 29 1455 • Newtek (042) 27 1620 • Novacastrian Electronic Supply
{049) 62 1358 • . Obiat PJy L)d 6~8 477f; 9 _Digitel 709 §511 e Geott Wpod 427 1676
QUEENSLAND St Lucia Electronics 252 7466 • BAS. Audiotronics 844 7566 • The Electronics
Shop (075) 32 3632 • Solex (Townsville)(077) 72 4466 • Xanthos Electrical (079) 27 8952
S.AUSTRALIA Force Electronics (08) 212 5505 VICTORIA G.B. Telespares 328 4301 e The
Electronic Components Shop 670 6474 • Factory Controls (052) 78 8222 • Mektronics 587
3888 • Truscott Electronics 723 3094 W AUSTRALIA Atkins Ca rlyle 48 1 1233 • Leda
Electronics 361 7821 PAPUA NEW GUINEA TE (P.N.G.) Pt Moresby 25 6322 Lae 42 6246
·Recommended prices only
NOVEMBER 1990
81
36-PIN CONNECTOR
-
PRllfTER
25-PIN CONNECTOR
1
STROBE
1
2
DATA 1
2
3
DATA2
3
4
DATA3
4
5
DATA4
5
6
DATAS
6
7
DATA6
7
8
DATA 7
8
9
DATA8
9
10
ACKNLG
10
11
BUSY
11
12
PE
12
13
SLCT
13
14
AUTO FEEDXT
14
COMPUTEB
GROUNDS18THROUGH25
31
-
INPUT PRIME
16
32
FAULT
15
36
SLCTIN
17
Fig.4: if you are not sure about the details of your printer's parallel interface
you should look at the instruction manual. Included will be a diagram like this
which shows the exact pin assignments.
socket-type - examine your parallel
printer if you are still unsure.
The standard parallel connector
from your computer is more likely to
be the 25-pin D-shell socket-type (DB25S). This connector conserves space
since it is smaller than the Centronics
connector (see Fig.2). Thus the "standard" parallel printer cable commonly
has a male 36-pin Centronics connector at one end to mate with the
SECONDARY RECV'. DATA
DCE TRANB:r.nTTER
SECONDARD RCV'. DATA
RECEIVER SIGNAL
SECONDARY R.T .S.
DATA TERMINAL READY
SIGNAL QUALITY DETECT
RING INDICATE
DATA BIG. RATE SELECT.
DTE TRANS. BIG. ELE. TIM.
14
15
16
17
18
19
20
21
22
23
24
25
printer's socket-type printer connector, and a 25- pin D-shell (DB-25P)
connector at the other to mate with
the computer's parallel port.
The D-shell connector is so named
because it is "D" shaped - although
one could argue that the Centronics
connector is shaped likewise. Common D-shell connectors are the 25pin variety which have the DB-25
prefix and the DB-9 connectors corn1
2
3
4
5
6
7
8
9
10
11
12
13
PROTECTIVE GROUND
TRANB:r.nTTED DATA
RECEIVE DATA
REQUEST TO SEND
CLEAR TO SEND
DATA SET READY
SIGNAL GROUND
RECEIVED LINE SIGNAL DETECT
+ VOLTAGE
-VOLTAGE
SECONDARY RECV. LINE DETECT
SECONDARY CLEAR TO SEND
Fig.5: this is the pin assignment for the RS-232 interface on a modem. Be aware
though that they are by no means standard. If you are connecting a modem or
other serial device, make sure you find out the exact pin assignment otherwise
you could have lots of hassles with plugs and cables.
82
SILICON CHIP
manly used for serial connections (eg,
modems.) Note that in all cases, the
"P" suffix stands for pin (male) while
the "S" suffix stands for socket (female).
Problem - if one end of the cable
has a connector with 25 pins and the
other end a connector with 36 pins,
how does the message get through?
Answer - not all wires are connected.
Fig.4 shows a typical parallel interface line diagram. Although there is
considerable standardisation, you
must check your computer and printer
manuals for specific information.
As mentioned earlier, while the
parallel connection is by far the most
popular for printers, the main problem is the limit on the length of the
cable. Solution - use a serial print
connection instead.
Serial cables
The Reference Standard number
232 version C or RS-232C serial port
(also called RS-232) on your computer
is primarily used for devices that must
communicate bidirectionally with the
system, such as modems, mice, scanners, digitisers - or any device that
"talks" as well as receives information from the PC. The asynchronous
serial interface is, in fact , the primary
system-to-system communication
device. It is character oriented and
thus has about 20% overhead for the
extra information needed to identify
each character.
Data is transmitted through the
cable one bit at a time, with each
individual character framed by a standard start and stop signal as opposed
to a parallel transmission of eight or
more bits at a time. The recommended
cable length is 15 metres, however
much longer cables generally work
without any problems.
Your computer may have no serial
ports or several. DOS numbers them
consecutively as COM1, COM2,
COM3 and so on. The original PC and
XT computers and most clones of that
era used the DB-25P connector and
so required a serial cable like the one
shown in Fig.1. The introduction of
the AT computer saw a change to the
computer connector with the advent
of the DB-9P connector which has 9
rather than 25 pins for the serial port.
Fun with RS-232
The serial port requires a communications or RS-232 cable to connect
Table 1: Modem Pin Assignments and Description
PIN
NAME
DIRECTION
DESCRIPTION
2
T.D.
To DCE
Transmit Data: data is
transmitted out from the terminal
to the modem etc
3
R.D.
From DCE
Receive Data: data coming into
the terminal from the device
4
R.T.S.
To DCE
Request To Send: the signal
form the DTE informs the device
that the terminal has data to
send
5
C.T.S
From DCE
Clear To Send: indicates to the
computer or terminal that data
may be sent to pin 2 for
transmission. Signal appears in
response to asserting RTS
6
D.S.R.
From DCE
Data Set Ready: indicates to the
terminal that the device is
connected
7
Gnd
Both
Signal Ground: all signals on
other pins are referenced to this
level
8
C.D.
From DCE
Carrier Detect: indicates that a
valid carrier has been received
12
H.S.
From DCE
High Speed: signal is low when
the device has established
communications
15
TCLK
From DCE
Transmit Clock
17
RCLK
From DCE
Receive Clock
20
D.T.R.
To DCE
Data Terminal Ready: signal
from the computer or terminal
which enables/disables
operation of all inputs/outputs of
the RS-232
22
R.I.
From DCE
Ring Indicate: changes level
when a ring signal is detected
24
XTCLK
To DCE
External Clock input to device
a serial port to another serial device and here is where the fun really begins! The "standard" serial cable can
be either straight-through or a nullmodem cable. Most IBM/clone systerns use pin-type connectors for the
serial port so you must use a serial
cable with a mating socket-type connectar (DB-9S or DB-25S) at one end
and at the other a connector suitable
for connecting to the other device.
Most devices have the socket-type
connector (DB-25S). so the cable usually has a mating DB-25P connector.
When you connect one PC to another, the cable needs to have a sockettype connector at both ends. What
happens when you want to connect
serial devices with differing connectars? You use either an adapter cable
or one of the many "gender benders "
supplied by most electronics stores.
Fig.6: this is a typical RS-232 "gender
bender", suitable for adapting male to
female connectors or two cables with
the same male or female plugs. They
can save you the trouble of having to
change a plug or the expense of
buying a new cable.
Fig.6 shows a typical example of the
gender changing devices available.
Armed with your serial cable and
assorted adaptor devices, the other
important information is the serial
interface itself.
Data terminal equipment
The source or destination of signals on a communications network is
known as Data Terminal Equipment
(DTE). A device such as a modem which establishes, maintains and terminates transmission while possibly
converting signals - is a Data Communications or Data Circuit-terminating
Equipment (DCE). The main difference between the two is how the signals at the DB-25 connector are arranged.
When you connect two DTE devices (ie, computer-to-computer), you
need a null-modem cable, while DTE
to DCE (ie computer-to-modem) requires a "normal" straight through
modem cable. Fig.5 shows the standard computer RS-232 pin assignments while Table 1 provides a brief
description of a typical serial connection - a modem.
What it all boils down to is that
cables are part and parcel of cornputer life. Confusion is overcome by
asking questions, experimenting and
labelling your cables as required.
Acknowlegement
Our thanks to Phil Gleeson of PC
Marketplace for the illustrations used
in this article.
~
NOVEMBER 1990
83
|