[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IIGS 115,200 Baud Serial Port - How?



Michael J. Mahon <mjmahon@aol.com> wrote:

> Hugh Hood wrote:
> > For many years, it's been generally accepted that the (2) IIGS built-in
> > serial ports (Zilog 8530 SCC chip) max out at 57,600 baud.
> > 
> > When pros like David Empson say so, I believe it.
> > 
> > And yet, along comes David Schmidt, with his ADTPro, and he's transferring
> > files at 115,200 baud from the IIGS modem port.
> 
> Even more interesting is the trick suggested by Stephen Thomas (and
> reported here by me ;-), to skip the clock divider on the Super Serial
> Card to allow the 6551 ACIA to move data at 115,200 bps.
> 
> The SCC has *always* been known to be capable of considerably higher
> rates, as, for example, when it is used to support AppleTalk.

[Just got back from holiday or I'd have answered sooner]

AppleTalk has the SCC operating in a different mode (SDLC) with a
different clocking system (FM modulation, but I forget offhand whether
it uses FM0 or FM1), and a DPLL to recover the clock from received data.
When using the DPLL in FM mode and the SCC master clock at 1X as the
source (3.6864 MHz), the DPLL outputs a divide-by-16 clock, so AppleTalk
runs at 3.6864e6/16 = 230400 bps.

In async mode with NRZ encoding, the SCC can't be operated with a 1X
clock if you want to receive anything, because it needs oversampling to
detect bit transitions. You therefore must use a 16X, 32X or 64X
clocking mode.

In the IIgs, for async mode, the SCC is normally configured to use baud
rate generator and a 16X clock source. The baud rate generator has a
minimum divisor of 4 due to the 2x multiplier and offset of 2 from the
value programmed into the registers. The maximum baud rate is therefore
3.6864 MHz / 16 / 4 = 57600 bps.

To get higher baud rates, you must bypass the baud rate generator and
use the RTxC pin as the direct source for the transmit and receive clock
(controlled via WR11, with separate settings for receiver and
transmitter).

In combination with the clock mode options in WR4, this gives you
potential baud rates of 3.6864 MHz divided by 16, 32 or 64, which are
230400, 115200 or 57600 bps.

I haven't experimented with these high baud rates, and I wouldn't expect
the IIgs to be able to keep up with 230400 async data even with an
accelerator. 115200 is more likely to be achievable.

(AppleTalk uses high priority interrupts combined with polled operation
to achieve 230400, but it locks out normal operation for tens of
milliseconds at a time and relies on relatively short packets of data
and half duplex operation. This technique is likely to be impractical
for asynchronous communication.)

-- 
David Empson
dempson@actrix.gen.nz