[comp.periphs] RS-232 protocol primer

hollen@zeta.megatek.uucp (Dion Hollenbeck) (06/22/89)

			Serial Protocols

I have had several requests to post more information about RS-232
software flow control protocols, notably, XON/XOFF and ETX/ACK. I
will, on purpose, not address hardware handshaking methods such as
RTS/CTS.  Some general questions which have been asked will also
be answered.

For the most part, standard PC/XT/AT BIOS's do not implement any
software flow control protocols (questions about this was what
originally prompted this discussion).  The BIOS only has the ability
to set the UART to a particular baud rate, data bits, stop bits and
parity.  If any BIOS's implement flow control, I would appreciate
hearing about them.  There are, however, device drivers which can
be installed to implement software flow control and interrupt 
driven, buffered serial IO.  They are available as independent
packages as well as part of various C libraries (other languages,
too).


			XON/XOFF
XON/XOFF protocol is a protocol implemented using two unprintable
ASCII characters, XON = 11h (aka DC1) and XOFF = 13h (aka DC3).
This protocol is typically implemented in both directions between
terminal and computer, or two computers.  It may, however, be only
implemented in one direction.  

For ease of description, let us assume this protocol implemented
between a host computer and a terminal which is an output only
device (no keyboard) and therefore, the XON/XOFF protocol is
implemented in one direction only.  We will also assume that the
terminal has a buffer of some size (1k for example) and cannot 
accept and display data as fast as the host can generate it, thus
flow control is necessary.  It is the responsibility of the terminal
to notify the host to stop sending data enough BEFORE the terminal's
buffer is full that the host can stop sending before overflowing
the terminal's buffer.

Generally, two independent processes happen on the host.  For
simplicity, I will pseudocode them into a simple polled loop, but
in reality for efficiency, the check for flow control on the host
side would be interrupt driven (not usually done on a PC, but can be).


		Host send a char function

	if no input char pending and xoff flag clear
		send char
		return

WAIT_FOR_XON:
	if xoff flag set
		wait until input char rec'd = XON
		clear xoff flag
		send char return
	endif
	if input char pending
		get input char
		if not XOFF
			buffer for later use
			send char
			return
		else
			set xoff flag
			go to WAIT_FOR_XON
		endif
	endif


It is assumed that there is an overlap when the host may have sent
characters to the terminal AFTER the terminal has sent XOFF to the
host, but before the host has received it.  Therefore, on the terminal's
side it is wise to send XOFF to the host when the terminal receive
buffer is about 3/4 full.  This depends on the size of the buffer,
the baud rate, and the latency in the host response to received 
characters.  The terminal is responsible for sending XON to the host
when it is again ready to receive more characters.  This generally
might be when it has emptied its buffer to the 1/4 full mark, thus
allowing for overlap and never having an empty buffer.  A scheme
such as this can keep both the host and the terminal busy as much as
possible, and not waste a lot of time in transmission when nothing
is being processed.



			ETX/ACK

ETX/ACK protocol is generally used between host computers and printers.
Although it may be used in other instances, it generally is not too
common.  The disadvantage of ETX/ACK is that the host implementation
must either know how big a buffer the receiving device has, or only send
buffers of a sufficiently small size that it could never overrun a
buffer of any device it may be sending to.  The other disadvantage is
that unlike XON/XOFF which can overlap sending and processing,  ETX/ACK
leaves very little room for overlap, although some does occur.  In the
example pseudocode, we will assume a 1k buffer on the device.

		Host send char function

	if rec'd char pending
		get char
		if char = ACK
			set ACK flag
		else
			buffer char
		endif
	endif

CHECK_FOR_ACK:
	if ACK flag set
		send char
		increment counter
		if counter = 800
			send ETX
			clear ACK flag
			reset counter to 0
		endif
		return
	else
		wait for ACK to be rec'd
		set ACK flag
		go to CHECK_FOR_ACK
	endif


This means that the host sends a buffer with an ETX (03h) tacked on the
end of it.  As the printer processes characters, it examines every
one to see if it is an ETX.  When it receives the ETX, it tosses it
and sends the host an ACK (06h) and resumes looking for input characters
to process.  Once the host has sent the buffer, it must wait until the
printer has processed every one of the characters until it can recognize
the ETX and send and ACK.  This reduces the amount of overlap in sending
that can occur.  The only overlap can occur while the host is sending
the buffer.  The printer has no way to inform the host to begin sending
again while it still has some buffer left to process, it must empty the
buffer before starting the hsot again.


			Question received


>  Other than XON/XOFF and ETX/ACK, are there any other "common" 
>  protocols?  (i.e - I have heard of STX/ETX = start of 
>  text / end of text).

Not including hardware handshaking, not to my knowledge.  STX/ETX are
markers which are commonly used to surround a block of transmitted data
for purposes of indicating block start and end.  Typically used so that
a block can be check-summed and re-transmitted if necessary.


Just keep in mind that in dealing with RS232, there are no hard and
fast rules.  The RS232 "standard" is merely a document which designates
the accepted use of the 25 wires in a cable and the physical configuration
of the size and shape of the connector (DB-25).  Many implementors make
unique use of the signals on the wires, and of the data sent over them.
There are some commonly accepted followed conventions, but always be
aware of someone having implemented them "almost" like you would expect.

I hope that this primer will be useful to many of you out there.  Do
not hesitate to mail me directly with questions.  If there are such
questions of general interest, I will post follow-ups to the net so
all can benefit.

	Dion Hollenbeck             (619) 455-5590 x2814
	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

                                seismo!s3sun!megatek!hollen
                                ames!scubed/

barmar@think.COM (Barry Margolin) (06/23/89)

In article <589@megatek.UUCP> hollen@megatek.UUCP () writes:
>			XON/XOFF
>  Therefore, on the terminal's
>side it is wise to send XOFF to the host when the terminal receive
>buffer is about 3/4 full.  This depends on the size of the buffer,
>the baud rate, and the latency in the host response to received 
>characters.  

Unfortunately, host latency can vary widely.  This is the most serious
problem with the XON/XOFF protocol; if the terminal assumes that the
host can respond to the XOFF faster than it actually can, the
terminal's buffer will overflow.  Some recent terminals allow the user
to set the XOFF threshhold in the SET-UP menu, but many terminals and
emulators don't.

My friends at school used to refer to XON/XOFF as the "help!  I'm
drowning" protocol; if the lifeguard doesn't notice you until you're
going down for the third time, you'd better hope he's a fast swimmer.

>			ETX/ACK
>  Once the host has sent the buffer, it must wait until the
>printer has processed every one of the characters until it can recognize
>the ETX and send and ACK.  This reduces the amount of overlap in sending
>that can occur.

High throughput is typically achieved with using ETC/ACK by employing
"double buffering".  This is a very simple form of what is known as
"windowing" in the context of network transport protocols.  If the
printer is believed to have an N-byte buffer, you send an ETX after
every N/2 bytes.  The sender is permitted to continue transmitting
when there is one ETX that hasn't been ACKed, but it stops sending
if it gets to the second ETX without having seen an ACK.

ETX/ACK with double buffering permits the most efficient use of the
bandwidth without running the risk of overflowing the printer's
buffer.

One problem I've seen with ETX/ACK, though, is that some printers
don't implement it very well.  We had an NEC SpinWriter that didn't
recognize ETX if it was inserted into the middle of an escape
sequence.  Our application used escape sequences heavily (it
implemented bidirectional printing by sending appropriate escape
sequences at the end of each line), while the ETX/ACK was implemented
in the bowels of the OS terminal driver, which knows nothing about
escape sequences sent by the caller.  From time to time the printer
would just stop until someone manually typed Control-F (ACK) on its
keyboard.


Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

dmt@mtunb.ATT.COM (Dave Tutelman) (06/23/89)

In article <589@megatek.UUCP> hollen@megatek.UUCP () writes:
>
>			Serial Protocols

Thanks, Dion, for a really good tutorial!

The only nit I'd like to pick is your subject line's suggestion
that this has anything to do with RS-232.  (The retitling to
"serial protocols" is appropriate, and "asynchronous protocols"
or "ASCII protocols" would be even more so.)

In fact, your comment about the RS-232 standard itself needs some
corrections...

> The RS232 "standard" is merely a document which designates
>the accepted use of the 25 wires in a cable and the physical configuration
>of the size and shape of the connector (DB-25). 

Why is the word STANDARD in quotes?  There is, in fact, a REAL LIVE
EIA standard, designated RS-232-C and dated 1981.  (Originally 1969,
reaffirmed 1981.)  It DOES NOT specify the DB-25 interface connector,
or any interface connector at all.  It DOES specify:

   -	Scope of applicability (e.g.- speeds to 20 kilobits/sec).
   -	Electrical characteristics (e.g.- driver & receiver voltages
	and impedances).
   -	Functional descriptions of the leads, including extensive
	"rules" of how they MUST be used (to comply with the standard).
   -	Some standard subsets of the full 25-lead interface.

>Many implementors make
>unique use of the signals on the wires, and of the data sent over them.
>There are some commonly accepted followed conventions, but always be
>aware of someone having implemented them "almost" like you would expect.

Most of the "conventions" to which you refer are in fact specified by the
functional rules in RS-232-C.  Some of the "unique uses" are in
direct violation of the standard, though most are permitted (or even
encouraged, if you read the standard closely).

Once again, thanks for a really good tutorial on asynchronous ASCII
protocols (which have nothing to do with RS-232).

+---------------------------------------------------------------+
|    Dave Tutelman						|
|    Physical - AT&T Bell Labs  -  Middletown, NJ		|
|    Logical -  ...att!mtunb!dmt				|
|    Audible -  (201) 957 6583					|
+---------------------------------------------------------------+

hollen@zeta.megatek.uucp (Dion Hollenbeck) (06/24/89)

From article <1538@mtunb.ATT.COM>, by dmt@mtunb.ATT.COM (Dave Tutelman):
> In article <589@megatek.UUCP> hollen@megatek.UUCP () writes:
>  [ ... stuff about titleing deleted ... ]
> In fact, your comment about the RS-232 standard itself needs some
> corrections...
> 
>> The RS232 "standard" is merely a document which designates
>>the accepted use of the 25 wires in a cable and the physical configuration
>>of the size and shape of the connector (DB-25). 
> 
> Why is the word STANDARD in quotes?  There is, in fact, a REAL LIVE
> EIA standard, designated RS-232-C and dated 1981.  (Originally 1969,
> reaffirmed 1981.)  It DOES NOT specify the DB-25 interface connector,
> or any interface connector at all.  It DOES specify:
> 
>    [ ... lots of good observations deleted ...]

Thank you for clarifying this to the net, Dave.  I do, in fact,
have a copy of the very standard you mention, but in my humble experience,
I have seen it violated more often than followed.  Therefore, I put
the word STANDARD in quotes.  In the hardware we build here, we do
our best to adhere to such standards when they exist, but this is,
unfortunately, not the case with many manufacturers.

And yes, I am wrong about the standard specifying the size and shape
of the connector.  I was talking off the top of my head and
obviously spliced into the standard pages from other documents
which do not belong there without realizing I was doing so.  This
merely points out that even the "experts" can give mis-information
in the process of being helpful.  Generally stems from having too
much information in the head and not realizing that it should be
looked up.

Sorry if I caused any confusion, and thanks to all for the corrections
which have been mentioned.  The important thing is that people out
there get the correct information.


	Dion Hollenbeck             (619) 455-5590 x2814
	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

        uunet!megatek!hollen       or  hollen@megatek.uucp

ken@cs.rochester.edu (Ken Yap) (06/24/89)

|> Why is the word STANDARD in quotes?  There is, in fact, a REAL LIVE
|> EIA standard, designated RS-232-C and dated 1981.  (Originally 1969,
|> reaffirmed 1981.)  It DOES NOT specify the DB-25 interface connector,
|> or any interface connector at all.  It DOES specify:

One reason the standard is dated is that it only talks about DCEs and
DTEs. Many real world devices are hard to classify either way. Is a
computer a DCE or a DTE. If I connect a terminal to a mainframe, it
should look like a DCE, right? But what if I have a PC and dial out
with a modem? Shouldn't it be a DTE then? What about a printer?  A DTE,
of course. OK, but what about hardware flow control? The RTS/CTS lines
are intended to the modem to tell the terminal when to send. But in
this case it is the printer that should tell the computer when it is
ready to receive. And on it goes.

To add to the confusion, many terminal manufacturers (DEC especially)
use the opposite type of connector from what most other people use. And
yes, the standard doesn't specify a connector so in principle computers
with 9 pin connectors are conforming, if irritating.

The problem is simply that the standard is inadequate for all the uses
it has been pressed into. It's a miracle things work together at all.

All of these problems can be solved with a little detective work. I
recommend the book The RS232 Solution (I think) for anybody who will be
dealing with RS232 interfacing in a big way. You thought a set of
straight through and null modem cables would solve your problems?  Read
the book and learn how cables with too many wires connected can
actually prevent the interface from working.

Sorry I've strayed from the original subject, which is really about
software flow control, but hardware handshaking is a big headache too.

rbthomas@athos.rutgers.edu (Rick Thomas) (06/24/89)

The referenced posting deliberately did NOT talk about hardware flow
control.

Could you do another posting on that subject please?

Thanks in advance!

Rick
-- 

Rick Thomas
uucp: {ames, cbosgd, harvard, moss, seismo}!rutgers!jove.rutgers.edu!rbthomas
arpa: rbthomas@JOVE.RUTGERS.EDU
Phone: (201) 932-4301

markz@ssc.UUCP (Mark Zenier) (06/25/89)

> |> Why is the word STANDARD in quotes?  There is, in fact, a REAL LIVE
> |> EIA standard, designated RS-232-C and dated 1981.  (Originally 1969,
> |> reaffirmed 1981.)  It DOES NOT specify the DB-25 interface connector,
> |> or any interface connector at all.  It DOES specify:

The sex of the connector.

"Section Three
3. Interface Mechanical Characteristics

3.1  The interface between the data terminal equipment and the data 
communications equipment is located at a pluggable connector signal interface
point between the two equipments.  The female connector shall be associated
with, but not necessarily physically attached to the data communications 
equipment..."

In article <1989Jun24.005740.19326@cs.rochester.edu>, ken@cs.rochester.edu (Ken Yap) writes:
> To add to the confusion, many terminal manufacturers (DEC especially)
> use the opposite type of connector from what most other people use. And
> yes, the standard doesn't specify a connector so in principle computers
> with 9 pin connectors are conforming, if irritating.

Dec and Zenith and very few others get it right, and put a male connector
on their DTE ports.  Lear Seigler, Qume, and every japanese printer 
manufacturer I've seen need a sex education lesson.  

Mark Zenier    uunet!nwnexus!pilchuck!ssc!markz    markz@ssc.uucp
                            uunet!amc!
-- 
Mark Zenier    uunet!nwnexus!pilchuck!ssc!markz    markz@ssc.uucp
                            uunet!amc!

hollen@zeta.megatek.uucp (Dion Hollenbeck) (06/26/89)

From article <Jun.24.01.51.56.1989.23986@athos.rutgers.edu>, by rbthomas@athos.rutgers.edu (Rick Thomas):
> The referenced posting deliberately did NOT talk about hardware flow
> control.
> 
> Could you do another posting on that subject please?
> 
 Can somebody else possibly do this?  We have deliberately avoided dealing
with hardware flow control since it is implemented in so many different
ways, and besides, the devices we talk to typically, are input only.
	Dion Hollenbeck             (619) 455-5590 x2814
	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

        uunet!megatek!hollen       or  hollen@megatek.uucp

henry@utzoo.uucp (Henry Spencer) (06/26/89)

In article <1954@ssc.UUCP> markz@ssc.UUCP (Mark Zenier) writes:
>"3.1  The interface between the data terminal equipment and the data 
>communications equipment is located at a pluggable connector signal interface
>point between the two equipments.  The female connector shall be associated
>with, but not necessarily physically attached to the data communications 
>equipment..."
>
>Dec and Zenith and very few others get it right, and put a male connector
>on their DTE ports.  Lear Seigler, Qume, and every japanese printer 
>manufacturer I've seen need a sex education lesson.  

Ah, but note the wording in the quoted section carefully.  It says that
the interface occurs at *one* interface point, where the DCE shall have
a female connector.  It says nothing about what's on the other end of the
cable.  In fact, the original rule was that the cable was supposed to come
with the DTE, making sex of connector (if any) at the DTE end unimportant.
Mind you, it still makes sense that *if* you have a connector at the DTE
end, it rationally ought to be male, but this isn't formally required.

Actually, if one wants to be rational about it, equipment ought to have
male RS232 connectors whenever physically possible.  The way these
particular connectors are built, the male connectors are much more
durable (solid post, as opposed to the springy sleeve on the female end),
so they ought to be used in the position where the connector is harder
to replace.  That is, on the equipment rather than the cable.  (If you've
ever wondered why VME backplane connectors are "inverse DIN", with male
on backplane and female on board, that's why.)
-- 
NASA is to spaceflight as the  |     Henry Spencer at U of Toronto Zoology
US government is to freedom.   | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

phil@diablo.amd.com (Phil Ngai) (06/27/89)

In article <1989Jun24.005740.19326@cs.rochester.edu> ken@cs.rochester.edu (Ken Yap) writes:
|To add to the confusion, many terminal manufacturers (DEC especially)
|use the opposite type of connector from what most other people use. And

I beg to differ. DEC and IBM are some of the best vendors in terms of
complying with what there is of the RS-232 spec and their use of a
male connector is correct. What do you think DTE stands for? Data
Terminal Equipment. Doesn't a terminal sound as though it should be
classified as DTE? Just because HP and Wyse and Televideo and Adds get
it wrong doesn't mean everyone should do it wrong. 

--
Phil Ngai, phil@diablo.amd.com		{uunet,decwrl,ucbvax}!amdcad!phil
"The government is not your mother."

barton@holston.UUCP (barton) (06/27/89)

Get this: I ordered an Epson LQ-1050 printer, which according to
the doc's comes with a "standard" RS-232C serial interface, only
to find out that the so called "standard" interface is actually
a 6 pin DIN connector! I wonder which standard they are refering 
to?

-- 
Barton A. Fisk          | UUCP: {texbell,uunet}!warble!holston!barton
PO Box 1781             | DOMAIN: barton@holston     
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | +++++ "Hal, open the pod bay doors" --- Dave

pritch@cheops.cis.ohio-state.edu (Norm Pritchett) (06/28/89)

In article <32@holston.UUCP> barton@holston.UUCP (barton) writes:
>Get this: I ordered an Epson LQ-1050 printer, which according to
>the doc's comes with a "standard" RS-232C serial interface, only
>to find out that the so called "standard" interface is actually
>a 6 pin DIN connector! I wonder which standard they are refering 
>to?

Why, RS-232-C of course!  Which, incidentally, doesn't require a
particular connector type (that's not until RS-232-D).  The claim
isn't that the connector is a standard one but that the signals in
the connector are (they gotcha!).

-=-

Norm Pritchett, The Ohio State University College of Engineering Network
Internet: pritchett@eng.ohio-state.edu	BITNET: TS1703 at OHSTVMA
UUCP: pritch@sydney.columbus.oh.us	CCNET: ENG::PRITCHETT (6172::PRITCHETT)

sme@computing-maths.cardiff.ac.uk (Simon Elliott) (06/29/89)

In article <1989Jun26.155855.1680@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> ...  The way these
> particular connectors are built, the male connectors are much more
> durable (solid post, as opposed to the springy sleeve on the female end),
> so they ought to be used in the position where the connector is harder
> to replace.

Now I am confused.  I always thought that the male connector was the one
with the pins, rather than the sockets.  It's been a long day, and I may be
reading Henry's article incorrectly, but he seems to be saying that the solid
block with the sockets in it is male, and that the flimsy shell with the pins
in it is female.  Do I need a basic biology lesson?
-- 
--------------------------------------------------------------------------
Simon Elliott            Internet: sme%v1.cm.cf.ac.uk@nsfnet-relay.ac.uk
UWCC Computer Centre     JANET:    sme@uk.ac.cf.cm.v1
40/41 Park Place         UUCP:     {backbones}!mcvax!ukc!reading!cf-cm!sme
Cardiff, Wales           PHONE:    +44 222 874300

dmt@mtunb.ATT.COM (Dave Tutelman) (06/29/89)

In article <32@holston.UUCP> barton@holston.UUCP (barton) writes:
>
>Get this: I ordered an Epson LQ-1050 printer, which according to
>the doc's comes with a "standard" RS-232C serial interface, only
>to find out that the so called "standard" interface is actually
>a 6 pin DIN connector! I wonder which standard they are refering 
>to?

Barton,
As I posted previously, the 232-C standard DOESN'T specify the connector.
(I am told that the newer RS-232-D does, but I haven't seen it;
anyway, your supplier said "C".)

The standard DOES list (in Section Five) a collection of 14 subsets
of the full 25-lead interface, which are allowable standard interfaces.
Several of them use six or fewer leads.

Thus there's nothing in the use of a 6-pin DIN connector to prevent
it from complying with the RS-232-C standard.

+---------------------------------------------------------------+
|    Dave Tutelman						|
|    Physical - AT&T Bell Labs  -  Middletown, NJ		|
|    Logical -  ...att!mtunb!dmt				|
|    Audible -  (201) 957 6583					|
+---------------------------------------------------------------+

michaelk@copper.MDP.TEK.COM (Michael D. Kersenbrock) (07/01/89)

<> ...  The way these
<> particular connectors are built, the male connectors are much more
<> durable (solid post, as opposed to the springy sleeve on the female end),
<> so they ought to be used in the position where the connector is harder
<> to replace.
<
<Now I am confused.  I always thought that the male connector was the one
<with the pins, rather than the sockets.  It's been a long day, and I may be
<reading Henry's article incorrectly, but he seems to be saying that the solid
<block with the sockets in it is male, and that the flimsy shell with the pins
<in it is female.  Do I need a basic biology lesson?

No, but he is right in a way.  The plug with "pins" has male connectors
located in a female connector housing.  Note that the "housing" IS female!
Likewise the other half has female connection-pins in a male housing!

When I say housing, what I mean is that if you removed the electrical
connection parts, you still could mate the connector housings, look at
them and figure out their sex.

Most people seem to call a connector "male" if it has male pins, but
being a stickler for such things, I call it "the female connector with
male pins" (which is most correct along with other paraphrases of the
same thing).

If you "build" connectors from some manufacturers, you can have both
male and female pins in a housing of either sex, or a hermaphroditic
housing.  Almost as tricky as life, eh?


-- 
Mike Kersenbrock
Tektronix Microprocessor Development Products
michaelk@copper.MDP.TEK.COM
Aloha, Oregon

pnelson@antares.UUCP (Phil Nelson) (07/01/89)

In article <821@cf-cm.UUCP> sme@computing-maths.cardiff.ac.uk (Simon Elliott) writes:
|In article <1989Jun26.155855.1680@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
|| ...  The way these
|| particular connectors are built, the male connectors are much more
|| durable (solid post, as opposed to the springy sleeve on the female end),
|| so they ought to be used in the position where the connector is harder
|| to replace.
|
|Now I am confused.  I always thought that the male connector was the one
|with the pins, rather than the sockets.  It's been a long day, and I may be
|reading Henry's article incorrectly, but he seems to be saying that the solid
|block with the sockets in it is male, and that the flimsy shell with the pins
|in it is female.  Do I need a basic biology lesson?

 No, you're right. Henry is wrong. Amazing, isn't it?

|-- 
|--------------------------------------------------------------------------
|Simon Elliott            Internet: sme%v1.cm.cf.ac.uk@nsfnet-relay.ac.uk
|UWCC Computer Centre     JANET:    sme@uk.ac.cf.cm.v1
|40/41 Park Place         UUCP:     {backbones}!mcvax!ukc!reading!cf-cm!sme
|Cardiff, Wales           PHONE:    +44 222 874300


-- 
Phil Nelson at (but not speaking for)                  OnTyme:NSC.P/Nelson
Tymnet, McDonnell Douglas Network Systems Company       Voice:408-922-7508
UUCP:{pyramid|ames}oliveb!tymix!pnelson              LRV:Component Station
"What we face is government troops and we have no guns."  -Chinese student

Ralf.Brown@B.GP.CS.CMU.EDU (07/01/89)

In article <471@antares.UUCP>, pnelson@antares.UUCP (Phil Nelson) writes:
}In article <821@cf-cm.UUCP> sme@computing-maths.cardiff.ac.uk (Simon Elliott) writes:
}|In article <1989Jun26.155855.1680@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
}|| ...  The way these
}|| particular connectors are built, the male connectors are much more
}|| durable (solid post, as opposed to the springy sleeve on the female end),
}|| so they ought to be used in the position where the connector is harder
}|| to replace.
}|
}|Now I am confused.  I always thought that the male connector was the one
}|with the pins, rather than the sockets.  It's been a long day, and I may be
}|reading Henry's article incorrectly, but he seems to be saying that the solid
}|block with the sockets in it is male, and that the flimsy shell with the pins
}|in it is female.  Do I need a basic biology lesson?
}
} No, you're right. Henry is wrong. Amazing, isn't it?

Henry is right, you've both misread him.  He was talking about the thin metal
sleeves INSIDE the solid block of a female connector.  If one of them gets
bent out of shape, the corresponding pin of the male connector will not make
proper contact.  On the other hand, in the unlikely event that a pin on the
male end should get bent, you can always use a screwdriver to bend it back
into place....
--
UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school)
ARPA: ralf@cs.cmu.edu  BIT: ralf%cs.cmu.edu@CMUCCVMA  FIDO: Ralf Brown 1:129/46
			Disclaimer? I claimed something?
"When things start going your way, it's usually because you stopped going the
 wrong way down a one-way street."

henry@utzoo.uucp (Henry Spencer) (07/02/89)

In article <821@cf-cm.UUCP> sme@computing-maths.cardiff.ac.uk (Simon Elliott) writes:
>> ... the male connectors are much more
>> durable (solid post, as opposed to the springy sleeve on the female end),
>
>Now I am confused.  I always thought that the male connector was the one
>with the pins, rather than the sockets.  It's been a long day, and I may be
>reading Henry's article incorrectly, but he seems to be saying that the solid
>block with the sockets in it is male, and that the flimsy shell with the pins
>in it is female.  Do I need a basic biology lesson?

No, just a good night's sleep. :-)  I was talking about the contacts
themselves, not about the shell containing them.  The shells are pretty
durable on either side.  One reason why the female contacts are imbedded
in a solid block is that they *need* the support -- they really are much
flimsier than the male contacts, which can stand on their own.

(It should be noted that this isn't a biological necessity. :-)  There
has to be spring action to get proper wiping action when the contacts
mate, but in principle you could put a springy bulge on the male pin
and have the female sleeve solid and robust.  Such contacts do exist --
the banana plugs used for test leads, for example -- but they're not
too common nowadays.)
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

pnelson@antares.UUCP (Phil Nelson) (07/05/89)

|In article <471@antares.UUCP>, pnelson@antares.UUCP (Phil Nelson) writes:
|}In article <821@cf-cm.UUCP> sme@computing-maths.cardiff.ac.uk (Simon Elliott) writes:
|}|In article <1989Jun26.155855.1680@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
|}|| ...  The way these
|}|| particular connectors are built, the male connectors are much more
|}|| durable (solid post, as opposed to the springy sleeve on the female end),
|}|| so they ought to be used in the position where the connector is harder
|}|| to replace.
|}|
|}|Now I am confused.  I always thought that the male connector was the one
|}|with the pins, rather than the sockets.  It's been a long day, and I may be
|}|reading Henry's article incorrectly, but he seems to be saying that the solid
|}|block with the sockets in it is male, and that the flimsy shell with the pins
|}|in it is female.  Do I need a basic biology lesson?
|}
|} No, you're right. Henry is wrong. Amazing, isn't it?
|
|Henry is right, you've both misread him.  He was talking about the thin metal
|sleeves INSIDE the solid block of a female connector.  If one of them gets
|bent out of shape, the corresponding pin of the male connector will not make
|proper contact.  On the other hand, in the unlikely event that a pin on the
|male end should get bent, you can always use a screwdriver to bend it back
|into place....

 You're right, I misread Henry's article (sorry, Henry). I thought that what
was being said was that the female connector should be on equipment, not
the male. My experience is that the female DB-25 connector is more durable
than the male, precisely because the "sleeves" are recessed within the
connector block. The male connector is subject to bent pins, which can only
be straightened very few times before they break, split pins (most pins
are made in two halves, pressed together, these can split at the tip,
creating a "V" which can snag the edge of the "sleeves" in the socket),
and bent shells. Those installations where the where the male connector
is recessed within the equipment are not subject to the bent shells, but
the first two still apply.

 I have dealt with quite a few of these connectors, and I have never had to
replace a "sleeve" on a female connector, I have replaced bent and broken
pins on the male connectors.

 In ideal conditions, I suppose the male connector will last longer, because
it has no spring to lose tension over time, in the real world (the one I
work in, at least), rough treatment damages more male connectors.

 By the way, does anyone know how long the spring lasts?


|--
|UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school)
|ARPA: ralf@cs.cmu.edu  BIT: ralf%cs.cmu.edu@CMUCCVMA  FIDO: Ralf Brown 1:129/46
-- 
Phil Nelson at (but not speaking for)                  OnTyme:NSC.P/Nelson
Tymnet, McDonnell Douglas Network Systems Company       Voice:408-922-7508
UUCP:{pyramid|ames}oliveb!tymix!pnelson              LRV:Component Station
If IBM is '1984', Apple is 'Brave New World'

vail@tegra.UUCP (Johnathan Vail) (07/06/89)

In article <1989Jul1.230627.28355@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:

   In article <821@cf-cm.UUCP> sme@computing-maths.cardiff.ac.uk (Simon Elliott) writes:
   >> ... the male connectors are much more
   >> durable (solid post, as opposed to the springy sleeve on the female end),
   >
   >Now I am confused.  I always thought that the male connector was the one
   >with the pins, rather than the sockets.  It's been a long day, and I may be
   >reading Henry's article incorrectly, but he seems to be saying that the solid
   >block with the sockets in it is male, and that the flimsy shell with the pins
   >in it is female.  Do I need a basic biology lesson?

   No, just a good night's sleep. :-)  I was talking about the contacts

The gender way of describing these things is really confusing.  I
prefer the way that the connectors describe themselves: DB-25P or
DB-25S for Pins or Sockets.  That way you know what you have and don't
have to figure out if someone means the actual little pins are male or
the shell is....

"Frisbeetarianism is the belief that when you die, your soul goes up on
the roof and gets stuck." -- button
 _____
|     | Johnathan Vail | tegra!N1DXG@ulowell.edu
|Tegra| (508) 663-7435 | N1DXG@145.110-,145.270-,444.2+,448.625-
 -----