15.3.5 Second serial port Second serial port on 520 ST
How to get a Second RS232 Port for your Atari
It might happen to you that you need a second RS232 port for your
ATARI ST. Perhaps you have a printer with a serial port and a telephon
modem, as I do. The first idea might be to go to your dealer expecting
that he has an extension card for a few bucks. He hasn't, and you get
curious about whether the ATARI can be regarded as a real computer.
Anyway, you need a solution and don't want to trade your ATARI for one
of those clones and are even more upset about the idea of exchanging
the connectors any time you use another peripheral. This can be the
point when you consider looking more seriously into the hardware
detecting that there is this MIDI port you never spent any thought
about. It is just there for those people who cannot play piano
properly and compensate for this by buying a lot of electronic parts
hoping that they can improve their music by it :-). You may even have
a different opinion about them. You know, however, for sure that *you*
won't use this port. Therefore it seems to be a good idea to useit for
your own purposes. The above describes precisely my thoughts leading
to the modification of my ATARI described below. It's just an easy,
quick and cheap hardware hack - it doesn't meet the RS232 standards -
but it works! I used a RS232 receiver to receive *and* send the
signals, because this was the chip I found somewhere in my old
computer (a 6800 !!) where it served the same purpose. However, note
that nowadays RS232 tranceivers are available which should be used
instead. Note that the description below applies *only* to the ATARI
520 ST and things may be different for the 1040. Additionally, the
description can be, of course, incorrect. Therefore you should verify
that the modifications described below are correct by consulting the
proper sources. In any way, modifications according to the description
below carried out by you are on your own risk. In particular, you
should be aware that the warranty for your computer will expire after
opening it.
1. A Communication Port
The first thing you have to decide is what communication port you
like to use. I chose the MIDI IN port for three reasons:
* I won't use MIDI after the modification.
The drawback of this solution is that you might easily confuse the
MIDI IN port with the MIDI OUT port when plugging in your connector
which can result in blowing up your peripheral.
I use the following pin assignment:
* Pin 1 = RS232 OUT
Note that pin 4 & 5 are already used. Pin layout of the
communication port seen from inside:
1 3 4 5 2
NOTE: In a lot of sources including my ATARI manual I found a
different pin layout which, however, seems to be wrong.
SOLDERING: Pin 2 of MIDI IN has to be connected with pin 2 of MIDI
OUT.
2. Rewiring the MIDI ACIA
The wiring of the MIDI ACIA has to be changed. We have to rewire
the Tx-Data and Rx-Data pins, because we want to use a different
driver. Additionally, the Tx-Clk and Rx-Clk must be connected to a
different clock, because a fixed baud rate of 7812.5 is probably not
appropriate. In the ATARI 520 ST the 6850 sitting next to the sound
chip - the YM 2149 - is the right chip.
CUTTING:
3. A New Baud Rate Generator
Timer A of the MFP 68091 is not used and can be employed as a baud
rate generator for our ACIA. A tiny assembler program setting the
correct baud rate is given below. I usually run this program at boot
time from my AUTO folder. A more sophisticated solution could be to
write an accessory to set the baud rate.
SOLDERING:
4. An RS232 Driver
As I said above, I used a RS232 receiver (SN 75189) for both
transmitting and receiving. That means that the outgoing signal does
*not* conform to the RS232 voltage level specification. However, this
cheap kludge always worked. SOLDERING:
* Mount a 75189 (RS232 receiver) on a small circuit board.
* Connect pin 3 (1Y) of the 75189 with pin 1 (RS232 Out) of the
MIDI IN port.
SETTING THE BAUD RATE:
* Initialize Timer A as baud rate generator for MIDI ACIA * * Bernhard Nebel 14.12.86 * * valid values for data and control are: * baud control data * 19200 1 1 * 9600 1 2 * 4800 1 4 * 3600 1 5 * 2400 1 8 * 2000 1 10 * 1800 1 11 * 1200 1 16 * 600 1 32 * 300 1 64 * 200 1 96 * 150 1 128 * 134 1 143 * 110 1 175 * 75 2 64 * 50 2 96 gemdos equ 1 bios equ 13 xbios equ 14 Pterm0 equ $00 Cconws equ $09 rsconf equ 15 setprt equ 33 xbtimer equ 31 modem .equ * move.l #-1,-(sp) vector move.w #64,-(sp) data move.w #1,-(sp) control move.w #0,-(sp) timer = A move.w #xbtimer,-(sp) trap #xbios add.l #12,sp move.l #mess,-(sp) move.w #Cconws,-(sp) trap #gemdos addq.l #6,sp move.w #Pterm0,-(sp) trap #gemdos * strings .even mess dc.b "MIDI port initialized (300 baud, 8-Bit, Nosync).",$0D,$0A,0
Copyright © Robert Schaffner (doit@doitarchive.de) Letzte Aktualisierung am 23. Mai 2004 |