[comp.sys.mac] Mac+ DTR never mind / pinouts

zben@umd5 (Ben Cranston) (01/14/87)

As Emily Letilla would say, "Never mind!".  Over the holidays I duplicated
some of my Mac cables for a co-worker.  To my horror, shame, chagrin, etc I
found the "DTR" signal wired to pin 19 instead of pin 20.  With this error
corrected the Mac+ DTR signal works just fine, and the predicted behaviour
is in fact observed.  Those terminal programs that drop DTR upon exit cause
the line to be dropped; those that do not change DTR can be exited and then
subsequently re-entered without losing the modem connection.  Please find a
table of such programs at the end of this article.

What about my wild claims that the signal was electrically inverted?  Sure
doesn't seem that way now.  It's amazing how often we see only what we want
to see, regardless of the realities ("Well, the signal WAS changing, but the
modem kept dropping out anyway, so the signal MUST have been backwards...").
Er, um, 40 lashes with a wet noodle.

I do have a quarrel with Frank da Cruz's DB9 to Din-8 equivalence table,
as published in Info-Mac Digest V5#2 (Monday, 27 Oct 86).  I do sympathize
with anyone trying to figure this out - for quite a long time I had backwards
pin numbers too - based on the appendix of the Imagewriter ][ manual.  The
fact that the standard Mac to Imagewriter ][ cable is not straight-through
(it's actually a null-modem!) adds yet another layer of complexity.  As an
attempt to set the record straight, I adapted this diagram from one found in
Macintosh Technical Note 65 (Mac+ Pinouts):

             Macintosh Plus Serial Connectors (Mini DIN-8)

** AS SEEN FROM FEMALE CONNECTOR **
                ------

       /------###------\         1 HSKo          Output Handshake
     /        ###        \                        (Zilog 8530 DTR pin)
   /                       \     2 HSKi / Clock  Input Handshake or extern clk
  /     [|]   [|]   [|]     \                     (Depending on 8530 mode)
 /       8     7     6       \   3 TxD-          Transmit data (minus)
|                             |
|                             |  4 Ground        Signal ground
|     ===       ===    ===    |
|      5         4      3     |  5 RxD-          Receive data (minus)
|                             |
|                             |  6 TxD+          Transmit data (plus)
 \----+    ===   ===    +----/
  \###|     2     1     |###/    7 N/C           (no connection)
   \##|                 |##/
     \|                 |/       8 RxD+          Receive data (plus)
       \------###------/
              ###


Based on this diagram, and on my own homebrew cables (which DO work) the
updated signal table becomes:

DB-9   DIN-8    SIGNAL
 1      4      Frame Ground
 2             [was +5 in original MAC]
 3      4      Signal Ground
 4      6      TxD +
 5      3      TxD -
 6      1      RTS (Handshake OUT) [was +12 in original MAC]
 7      2      CTS (Handshake IN) or external clock
 8      8      RxD+
 9      5      RxD-


My original cable, with the above error corrected, does work, and the modem
drops out when the Mac is restarted or a terminal program drops DTR:

DIN-8              DB-25 Female

GROUND 4 o-+----o 7  GROUND
           |
RxD+   8 o-+

RxD-   5 o------o 3  RD
TxD-   3 o------o 2  TD

HSout  1 o-+----o 20 DTR
           |
HSin   2 o-+


I ended up building this three-wire cable for the co-worker who had already
set his modem up for ignore-DTR operation.

DIN-8              DB-25 Female

GROUND 4 o-+----o 7  GROUND
           |
RxD+   8 o-+

RxD-   5 o------o 3  RD

TxD-   3 o------o 2  TD

This is the simplest Mac+ serial cable I have seen, and it seems to work.
Looks like the HSKin to HSKout strap isn't even needed.  Some modems might
need additional strapping at the DB-25 end.

WHEW! As previously mentioned, it is far better to set your modem to ignore
the DTR signal.  That stuff is there to make sure the phone gets hung up when
the equipment is turned off.  We professionals should be smart enough to do
without that particular bit of user-friendliness.  If the modem cannot be set
to ignore DTR, one can try connecting DTR to some source of "true" at the
DB-25 connector.  The DSR (Data SET ready) would be a good first guess.  An
RS-232 breakout box is a wonderful tool for solving this sort of problem.

Should you be:

A.  Using a Macintosh Plus
B.  Using a cable that connects HSKout to DTR
C.  Using a modem that cares about DTR

Then exiting from these virtual terminal programs will drop your line:

Red Ryder 9.4       MacTerminal 2.0    Fasterm 3

These programs allow exit and reentry without dropping the modem line:

Kermit 0.8(34)      Unix Window 3.4a


Does anybody remember the "RS232 Expert System" that was supposed to solve
this sort of problem...   :-)
-- 
                    umd5.UUCP    <= {seismo!mimsy,ihnp4!rlgvax}!cvl!umd5!zben
Ben Cranston zben @ umd2.UMD.EDU    Kingdom of Merryland UniSys 1100/92
                    umd2.BITNET     "via HASP with RSCS"

dubois@uwmacc.UUCP (Paul DuBois) (01/14/87)

> These programs allow exit and reentry without dropping the modem line:
> 
> Kermit 0.8(34)      Unix Window 3.4a

Also SquirmTerm.

---
Paul DuBois     UUCP: {allegra,ihnp4,seismo}!uwvax!uwmacc!dubois    |
                ARPA: dubois@easter                               --+--
                      dubois@rhesus                                 |
                                                                    |
"Don't we have enough madmen around here already?"
                                 I Samuel 21:15