Newsgroups: comp.dcom.modems
Subject: Hardware Handshaking summary
From: mpye@vmsb.is.csupomona.edu
Date: 11 Apr 92 06:02:51 PST
Organization: California State Polytechnic University, Pomona
Nntp-Posting-User: mpye

In article <1992Apr7.211334.1@vmsb.is.csupomona.edu> I wrote:

>What is a Hardware Handshaking cable?  I have a modem cable for my Mac.
>How would one know whether it's a HW Handshaker?  There are eight pins
>on the Mac side and 25 pins on the modem side.  I assume these have to 
>be mapped in a certain way.  Is this correct?  But it also seem that 
>with so few pins on the Mac side, there's just about only one way to
>map it to the modem side and have it still work.  Are some of the pins
>on the Mac side mapped to more than one pin on the modem side?  HELP!!!!

Here is a summary of the responces received via email.  THANKS TO ALL
WHO WROTE!!!!!


Hardware handshaking is the term used when a device uses hardware (as opposed
to software) to keep data from coming in too quick.  As an example, in a setup
consisting of a computer driving a printer, usually the computer can supply data
much faster than the printer can print it.  When the printer is almost out of
space in its buffer, it needs to tell the computer to stop sending.  Usually,
this is done via one of two ways:

    1) X-ON/X-OFF protocol - This is a form of software handshaking.  The
printer would send an X-OFF (ctrl-S) to the computer.  The computer would see
this, and stop sending data.  When the printer's buffer was almost empty, it
would send an X-ON (ctrl-Q) to the computer, causing it to resume sending data. 
You may have used this protocol yourself when using a computer that was sending
data to the screen faster than you could read.  Many people have used a
control-S to stop data when  a screen was full.  In a sense, the person is
acting like the printer, and stopping it when his buffer is full.

    2) hardware handshaking - There is an additional wire between the printer
and computer.  When the printer's buffer is almost full, it sets this line to
'FALSE'.  The computer senses this, and stops sending data.  Conversely, when
the printer's buffer is almost empty, it sets the wire's state to 'TRUE', which
causes the computer to resume data transmission.

    This is a rather brief overview of the concept.  Extending it to a modem
brings an additional level of confusion - now there are two channels of data
that may need to be temporarily stopped (data from modem to computer, and data
from computer to modem).  In this case, a hardware handshake setup would have
two wires to control data (one for each direction).  In the XON/XOFF case, the
characters would be sent along the same channel as the data (i.e., mixed in with
the data).

    Usually (but not always) hardware handshaking is done using the RTS/CTS
lines that are defined in the RS-232 spec.  I have seen many printers that
actually use a different line.  I don't know how the Mac does it, but it should
be documented by Apple.  Your modem documentation should indicate which lines
are used for handshaking.  The minimum cable for a hardware handshake
modem/computer connection would contain 5 lines:

    TXD Transmitted Data
    RXD Received Data
    RTS Request to Send (handshake)
    CTS Clear to Send (handshake)
    GND Signal Ground

Usually, 2/3 of the pins on the 25-pin side are unused.


From Mac Tech Notes:

#010: Pinouts

See also:   Macintosh Hardware Reference Manual
            Technical Note #65   Macintosh Plus Pinouts

Written by:      Mark Baumwell       April 26, 1985
Modified:                            July 23, 1985
Updated:                             March 1, 1988
________________________________________________________________________

This note gives pinouts for Macintosh ports, cables, and other products.
________________________________________________________________________

Below are pinout descriptions for the Macintosh ports, cables, and various
other products. Please refer to the Hardware chapter of Inside Macintosh
and the Macintosh Hardware Reference Manual for more information,
especially about power limits. Note that unconnected pins are omitted.


Macintosh Port Pinouts

Macintosh Serial Connectors (DB-9)
     Pin   Name       Description/Notes
     1     Ground
     2     +5V        See Inside Macintosh for power limits
     3     Ground
     4     TxD+       Transmit Data line
     5     TxD        Transmit Data line
     6     +12V       See Macintosh Hardware chapter for power limits
     7     HSK        HandShaKe: CTS or TRxC, depends on Zilog 8530 mode
     8     RxD+       Receive Data line; ground this line to emulate RS232
     9     RxD        Receive Data line


Macintosh Cable Pinouts 

Note for the cable descriptions below:

The arrows ("->") show which side is an input and which is an output. For
example, the notation "a -> b" means that signal "a" is an output and "b"
is an input.

When pins are said to be connected on a side in the Notes column, it means
the pins are connected on that side of the connector.


Macintosh Modem Cable (Warning! Don't use this cable to connect 2
Macintoshes!)
(part number 590-0197-A)
     Mac     Name             Modem     Notes
     (DB9)                    (DB9)
     3       Ground           3         pins 3, 8 connected on EACH side
     5       TxD  ->  TxD9
     6       +12V ->  DTR6
     7       HSK  <-  DCD     7
     8       No wire          8
     9       RxD  <-  RxD     5


---
Michael Pye
email: mpye@csupomona.edu
Newsgroups: comp.dcom.modems