Subject: Re: Serial port names
To: None <port-atari@netbsd.org>
From: Andy Ball <andy.ball@earthlink.net>
List: port-atari
Date: 07/11/2003 08:48:50
Hello Julian,

  JC> I think so - they both have the MFP- and SCC-driven
    > ports.  Although, I think the Mega-STE has one MFP
    > like the STE and the TT has an additional one (which
    > drives Serial 1.

That sounds right.

  JC> I don't know of a decent lightweight graphical web
    > browser.

Dillo is probably the nicest lightweight one I've tried.  It
would only need a few cracks filled for me to use it a lot
more, especially on older machines.

  JC> Also, bear in mind that the processor utilisation is
    > while you're receiving - as soon as you stop receiving
    > and start rendering the page, you don't use the CPU
    > cycles for the serial interrupts.

That's a good point.

  JC> Yep, almost all the sparc's (along with the early
    > sparc64's) have the ZS8530 chip.

Do you happen to know whether there's a pin compatible
version with deeper FIFOs? (wishful.thinking=on ;-)

  JC> Presumably something to do with the lines they could
    > get out of the second MFP in the TT.

I seem to recall that on at least some ST models some of the
hardware flow control lines were provided by the Yamaha
sound chip.  That might explain at least some of Serial 1's
missing lines.

  JC> The LAN port is shared with Serial 2, if I remember
    > correctly.  Anyway, its pinout is:
    >
    >   _________
    >  /    @    \
    > | 8   7   6 |
    > | 5   4   3 |
    > |   2   1   |
    >  \_________/
    >
    >   1       Handshakre Output
    >   2       Handshake Input or Internal Clock
    >   3       Transmit Data
    >   4       Ground
    >   5       Received Data
    >   6       Transmitted Data
    >   7       General Purpose Input
    >   8       Receive Data
    >
    > I don't know the difference between "Transmit",
    > "Transmitted" and "Receive", "Received".

RS-232 uses a single-ended driver, so transmitted signals
are a particular voltage relative to a common ground.

RS-422 uses a differential driver, where data are
represented by the balanced difference between a pair of
pins.  This works well with twisted pair cable because
external magnetic fields induce currents in both conductors
of a given pair.  Although their voltage with respect to
ground might change, the difference between them shouldn't
change much.

The improved immunity to external interference is probably
why RS-422 is good for lengths of up to 1.2 km Vs RS-232's
15m limit.  The practical distance limits are influenced by
many factors: data speed, external noise, type of cable
used, driver chips, luck etc.

I've seen conflicting numbering schemes for the       8 7 6
mini-DIN 8 connector used on the LAN port.  The
most common seems to be like this (note the gap      5   4 3
between pins 4 and 5)...
                                                       2 1
My pocket notebook suggests the following pinout
for RS-422 on the Mac, TT, MegaSTE etc...

               1 HSKo  Handshake out
               2 HSKi  Handshake in
               3 TX-   Transmit Data -
               4 SG    Signal Ground
               5 RX-   Receive Data -
               6 TX+   Transmit Data +
               7 GPI   General Purpose Input
               8 RX+   Receive Data +

I know that some Macs lack the hardware flow control signals
HSKo & HSKi.  If the LAN port shares a UART with 'Serial 2'
(which has hardware handshaking signals), I think it is
likely to implement HSKo & HSKi.  It would be nice to see a
schematic though for confirmation.

Notice that transmitted and received data are sent over
balanced (probably twisted) pairs.  HSKo, HSKi and GPi are
relative to a common signal ground.  Those signals are
likely to change much less rapidly than the data lines, so
external interference may be less of an issue.

If I were connecting a TT to
another TT, Falcon, MegaSTE,
Mac, Newton, Yamaha MU-5 etc,     3 TX-  -----\/----- TX-  3
this is what I would try.         5 RX-  <----/\----> RX-  5

I wouldn't be surprised if        6 TX+  -----\/----- TX+  6
this was the same as a            8 RX+  <----/\----> RX+  8
traditional Mac printer
cable.                            1 HSKo -----\/----- HSKo 1
                                  2 HSKi <----/\----> HSKi 2
Ideally I would put TX- and
TX+ down one twisted pair,        7 GPI  n/c      n/c GPI  7
RX- and RX+ down another.         4 SG   ------------ SG   4
The flow control and common      
ground signals probably don't    
care as much.

  JC> Apple Localtalk documentation might help. As Localtalk
    > is a bus, you can't have the same type of flow control.

It's probably best to think of LocalTalk as an extension to
the Mac serial port.  Not all Mac serial ports support
LocalTalk.  You're right of course that it's a bus.  I would
be interested in knowing what is inside a LocalTalk adaptor.
I also wonder how close LocalTalk is to RS-485: a multi-drop
bus similar to RS-422 (which is primarily for point-to point
links).

I have wondered in the past about the feasability of
building an actual LAN that uses the LAN port: either using
LocalTalk adaptors or some other kind of multi-drop adaptor.
The software might be a challenge though, and I don't know
if anyone would use such a thing anyway.

Another option I had considered was a kind of serial
equivalent of an Ethernet switch.  Pretty much any computer
with a serial port and SLIP (perhaps PPP, but SLIP appeals
to me) could attach to a port on this box and it would route
or forward packets to the other machines.  Perhaps it could
even have an Ethernet uplink port.  It's a blue sky idea for
when my drawing board is empty. :-)

- Andy Ball.