Subject: Re: Mac to PC-AT cross cable
To: Wada, Tatsuaki <wada@ee.ibaraki.ac.jp>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 08/28/1996 09:26:32
> I want to make the cross-cable, but I'm not sure the wiring diagram of the
> connection
> between a Mac DIN-8 conector and a PC-AT DB-9.
> Here are the Pin Assignments for DIN-8 and IBM DB-9. I found them in the
> Apple Technical
> Information Library.
> 
> 
>      Circular 8      Signal                             IBM DB-9
>         1       HSKo (+12V)                             1 DCD
>         2           HSKi                                2 RxD
>         3           TXD-                                3 TxD
>         4           GND                                 4 DTR
>         5           RXD-                                5 SG
>         6           TXD+                                6 DSR
>         7           No Wire                             7 RTS
>         8           RXD+                                8 CTS
>         GND                                             9 Ring Indicator
> (not implemented)

That's not exactly correct. I'm not certain on the pin #'s,
but HSKo is certainly not +12, and you need GPi in there somewhere,
pin 7 I think.

> In particular I'm not sure how to handle the following pins of DB-9,
> 
>         DCD
>         DTR -- Data Ready?
>         DSR
>         RTS -- Ready To Send?
>         CTS
> 
> because I don't know what they mean.

DCD = Data Carrier Detect, there's a modem on the other end of the phone
DTR = Data Transmitter Ready - the computer's ready
DSR = Data Set Ready (?) - the modem's ready (?)
RTS = Request To Send
CTS = Clear To Send

RTS & CTS are what's known as hardware flow control. DTR/DSR say when there's
a box on the other side of the cable, and RTS/CTS say if the respective
data buffer has space.

>   Circular 8      Signal                             IBM DB-9
>         1       HSKo (+12V)                           ?
>         2           HSKi                              ? 
>         3           TXD-    -----------------------   2 RxD
>         4           GND     -----------------------   5 SG    
>         5           RXD-    -----------------------   3 TxD 
>         6           TXD+                              ?
>         7           No Wire                             
>         8           RXD+                              ?  
>         GND                                            
> 
> Any comment or sugestion is welcome.

Good so far.

For better results, hook RxD+ to ground. :-)

Since you're crossing transmitted and received data, I assume you're making
a null modem for connection to a computer.

The last three pins are a bit tricky. Well, GPi is the mac's DCD, so
hook it to DTR. HSKi is CTS, so hook it to IBM's RTS. HSKo is the only
output; what you do with it depends on the other device. For modems,
hook it to DTR on the other side (so it will hang up a modem). But for
here, hook it to the IBM's CTS.

To use flow control between them, use crtscts for normal mac flow
control. the mac will watch its CTS (IBM's RTS) and shut up when the IBM
asks. If you get overruns on the mac, you might also want to use a
mac-only, only-for-1.2 trick. Assert crtscts AND mdmbuf flow controls.
for the current drivers, this will put them in a mode where CTS enables
transmission, and DTR gets toggled to throttle reception. -current
drivers support this feature, though it's untested.

1.3 will do something different to decide if DTR is really DTR or CTS.

I'm not really sure what to do with the other pins. Maybe tie DCD to DTR
on the IBM. RI you can leave alone.

Take care,

Bill