RSVE, hhere Baudraten fr die serielle Schnittstelle des ST
(ebenfalls verwendbar fr Modem1 der MegaSTE und TT Computer)
*************************************************************
(English text is appended on the German, look for it)


Sinn und Zweck des RSVE
-----------------------

RSVE ermglicht die Benutzung von hheren Datenraten als 19200Bd auf der
seriellen Schnittstelle Modem1. Mglich sind 38400, 57600 und 115200Bd.

RSVE ist in der Ansteuerung kompatibel zu RS_Speed von Stephan Skrodzki 
@KA.

RSVE bentigt nur vier Kabel zum Anschlu im Computer. Deshalb ist auer 
dem Quarzoszillator und dem GAL16v8 noch ein Schaltkreis fr 1 DM 
vorhanden. Eigentlich wollte ich diesen Schaltkreis einsparen und alles in 
ein GAL39v18 (=GAL6001) packen, lie es wegen der geringen Verbreitung und 
des hheren Preises des GAL39v18 aber sein. Da nur zwei Kabel am MFP 
angeschlossen werden mssen, ist die Arbeit besonders bei den mit 
Quadpack-MFP ausgestatteten TTs und MegaSTEs wesentlich einfacher.

Copyright
---------

RSVE darf fr den Eigenbedarf gebaut werden. Gegen den Aufbau fr gute
Freunde habe ich ebenfalls nichts. Dabei darf der Bastler aber keinen
Gewinn damit machen. Eine kommerzielle Fertigung oder Verwertung ist nur
mit meiner schriftlichen Zustimmung erlaubt. ber eine kleine Spende in
Hhe von 5DM von jedem zufriedenen Nutzer wrde ich mich freuen. Warum?
RSVE habe ich zuerst mal fr mich selbst entwickelt (egoistisch, nicht?).
Das Erstellen einer mailboxversandfhigen Version der Dokumentation war mit
einem nicht unerheblichen Zeitaufwand verbunden.

Ich habe diese Bauanleitung sorgfltig berprft. Ich hafte in keiner Weise
fr eventuelle Fehler und/oder (daraus resultierende) Beschdigungen
irgendwelcher Objekte oder Subjekte.

In diesem Paket sind alle Informationen zu RSVE enthalten. Auer dem Layout
als Ultimade-PCB-Datei habe ich auch nicht mehr.
Schriftliche Anfragen werden nur beantwortet, wenn ein frankierter
Rckumschlag beiliegt.
Ich bin im Mausnetz unter
Harun Scheutzow @B
zu erreichen. Meine Postanschrift lautet:
Harun Scheutzow
Dresdener Strae 83
D-10179 Berlin


Inhalt des Paketes
------------------

RSVE_GAL.JED   Jedec-Fusedatei fr das GAL
RSVE_GAL.TXT   Logikgleichungen in Textform mit Kommentaren
RSVE_DOC.TXT   diese Dokumentation
BEST*.IMG      Bestckungsplan 1:1
USUNG*.IMG     Leiterzge der Leiterseite, gesehen von der Bestckungsseite
aus, Mastab 1:1
US*.IMG        Leiterseite im Mastab 1:1 als Sicht auf die Kupferflche

Die Dateien mit der Endung IMG sind schwarz/wei-GEM-Image Dateien. Das "*" 
steht fr die jeweilige Auflsung in dpi, also 300 fr 300dpi (geeignet fr 
Laserdrucker und Tintenstrahler) und 360 fr 360dpi (geeignet fr 24Nadler).

Alle Ltaugen und Leiterzge sind jetzt extra breit angelegt.


Langsamkeit der ST-Computer mit TOS
-----------------------------------

Bei Geschwindigkeiten ber 19200Bd gibt es ein generelles Problem mit dem
Betriebssystem des ST und den DF-Programmen. Wenn ein Programm im Polling
den MFP bedient, kann problemlos eine Datenrate von 115200Bd ausgenutzt
werden, indem wirklich 11520cps (Character per Second) bertragen werden.
Werden jedoch die BIOS-I/O-Routinen benutzt, so kann ein 8MHz ST bei
ZMODEM-Senden maximal 2500cps und beim Empfangen 2000cps erreichen. Wenn
der RTS/CTS-Patch/Optimierer TURBOCTS installiert wurde, erhhen sich diese
Werte auf 3000cps. Es mu bei 38400Bd also immer der RTS/CTS-Handshake
genutzt werden, da der ST beim Empfangen sonst Zeichen verlieren wrde.
Immerhin erlauben die Interruptroutinen des ST noch eine Baudrate von
38400, indem sie rechtzeitig die Zeichen abholen, im Puffer ablegen und bei
vollem Puffer der Gegenstelle das Senden verbieten. Eine bertragung mit
57600 und 115200 ist jedoch selbst fr die Interruptroutinen zu schnell,
sie schaffen es nicht, rechtzeitig die eintreffenden Zeichen abzuholen oder
der Gegenstelle das Senden zu verbieten.

Wenn ein 16MHz-Speeder installiert ist (z.B. serienmig im MegaSTE), so
sind auch 38400Bd mit etwa 3000cps mglich (oder noch mehr mit TURBOCTS).


Zum Bestckungsplan
-------------------

Bentigte Bauteile

Quarzoszillator 1.8432MHz
Zhler 74HC4040 (der normale CMOS 4040 ist zu langsam!)
GAL 16v8, programmiert fr RSVE
Keramikkondensator 100nF, 2 Stck
optional: Widerstand 1kOhm, Leuchtdiode

Der 74HC4040 ist wirklich auf der Leiterseite einzusetzen! Deshalb ist 
seine Bezeichnung im Bestckungsplan gespiegelt geschrieben.

Anschlsse der Schaltung

+5V   an +5V im Computer
GND   an GND im Computer
LED+  Anode der Anzeige-LED
LED-  Katode der Anzeige-LED
TID   an Pin16 des MFP
TUA   an Pin7 oder Pin10 des MFP

Die Anzeige-LED leuchtet, sobald eine der hohen Baudraten erzeugt wird.

Der MFP hat normalerweise den Aufdruck MC68901. Alle hier angegebenen
Pin-Nummern beziehen sich auf den 48poligen MFP im DIL-Gehuse. Wenn ein
52poliger MFP im Quadpack-Gehuse vorhanden ist, wie z.B. im TT, so gilt
folgende Zuordnung der Pin-Nummern:
48pol.  52pol.
Pin7    Pin8
Pin10   Pin11
Pin16   Pin18

Am MFP sind auf der Computerplatine Pin7, Pin10 und Pin16 untereinander
verbunden. Die Verbindung zwischen Pin7 und Pin10 mu erhalten bleiben, die
Verbindung dieser beiden Pins zu Pin16 mu aber aufgetrennt werden. Wenn
die entsprechende Leiterbahn nicht auffindbar ist, kann Pin16 auch direkt
ber der Computerplatine durchtrennt werden.


Baudraten
---------

Hier nochmal die ohne RSVE mglichen Baudraten:
19200, 9600, 4800, 2400, 2000, 1800, 1200,
600, 300, 200, 150, 134, 110,
75 (das TOS stellt aber 120 ein!!!),
50 (das TOS stellt aber 80 ein!!!)

RSVE konvertiert folgende Baudraten:
150 (eingestellt) -> 115200 (real)
134 (eingestellt) ->  57600 (real)
110 (eingestellt) ->  38400 (real)


Technische Kurzerklrung
------------------------

TID ist der Timer D Ausgang des MFP, der normalerweise den Baudratentakt 
lieferte. Dieser ist 16mal so gro wie die Baudrate.

Gal liefert fr 38400Bd sowieso immer 614400Hz (mte nicht sein, ist aber 
ntzlich, wird deshalb nicht wegoptimiert). Damit wird ein 12Bit-Zhler 
74HC4040 betrieben (von dem nur die unteren acht Bit ausgewertet werden), 
solange TID L ist.

Baud  Impulse  Fangbereich  Wirkung          BD1   BD2
200    96                   alte Baudraten    L     L
150   128      112..135     115200Bd ein      H     L
134   143      136..159      57600Bd ein      H     H
110   174      160..223      38400Bd ein      L     H

Baudraten 75 und 50 nicht setzen, da das TOS diese falsch einstellt. Wenn 
man sie direkt richtig einsetzt, werden aus 75Bd (256Impulse mod 256 = 0) 
immer 75Bd und aus 50Bd (384Impulse mod 256 = 128) immer 115200Bd.

Alle Fangbereich-Grenzwerte sind durch 8 teilbar. Die unteren drei Bit des 
Zhlers werden deshalb nicht ausgewertet.

Zwei Trick-Register speichern den Zhlerstand bei der TID L/H-Flanke. BD1 
wird fr 112..157 und BD2 fr 136..223 aktiv (H).

Je nach Trickregisterinhalt wird TID, T1 (Quarztakt), T2 (Quarz/2) oder T3 
(Quarz/3) an den Ausgang TUA gelegt.


Schlubemerkung
---------------

Ich wnsche einige frohe Bastelstunden. Meine Adresse ist unter "Copyright"
zu finden.

Eine kleinere Leiterplatte (nur 33mm*33mm), das programmierte GAL, andere 
Einzelteile und den komplett aufgebauten RSVE gibt es auch bei mir. Wer 
nicht soviel selbst basteln will, kann Arbeit sparen und stattdessen Geld 
ausgeben. Preise teile ich auf Anfrage mit.

Es existiert ein Paket von seriellen Treibern von mir, HSMODA*.LZH, dessen 
Einsatz ich zusammen mit RSVE empfehle. Das Archiv ("*" steht fr eine 
zweistellige Zahl, die sich mit jeder neuen Version erhht) sollte in 
Mailboxen zu finden sein. 

Berlin, 28.11.1992, 01.02.1993

Harun Scheutzow

Letzte nderung: 04.07.1994





RSVE, higher baud rates for the ST's serial line (useable for Modem1 port
of MegaSTE and TT Computers as well)
************************************************************************


Purpose of RSVE
---------------

RSVE makes it possible to use higher line speeds than 19200 Baud over the
serial port Modem1. The supported baud rates are 38400, 57600, and 115200.

RSVE's software interface is compatible with RS_Speed from Stephan
Skrodzki @ KA (stephan_skrodzki@ka.maus.de).

Only four wires are needed to connect RSVE to the computer. For this
reason, there is only one chip necessary in addition to the quartz
oscillator and a GAL 16V8. Actually I wanted to save this chip and
integrate its functionality into a GAL39V18 (=GAL6001), but due to the
low circulation and the higher price I preferred the current solution.
There are two wires that have to be connected to the MFP, so the
installation can be done rather easy, especially into the TT and
MegaSTE, which are supplied with a Quadpack MFP.

Copyright
---------

RSVE may be assembeled for your own use. I have no objections against
assembly for your good friends, if the builder does not earn money with it.
Commercial production or use is only allowed with a written permission
from me. I would like to receive a small donation of 5 DM from every
contented user. Why? I developped RSVE for my own use in the first place
(selfish, isn't it?). The writing of a documentation suitable for
mailboxes took a considerable amount of time.

I checked this assembly instructions carefully. I'm not liable in any
way for possible errors and resulting damage of things or persons.

Contained in this package, you will find all the information regarding RSVE.
I do not have any further material myself, except for an Ultimade-PCB layout
file. Written questions will only be answered if a post-paid return envelope
is included.

You can contact me in MausNet via the address Harun Scheutzow @ B
(InterNet: harun_scheutzow@b.maus.de). My postal address is:

  Harun Scheutzow
  Dresdener Strasse 83
  D-10179 Berlin

Content of the package
----------------------

RSVE_GAL.JED   JEDEC fuse file for the GAL
RSVE_GAL.TXT   logic equations in text form with comments in German language
RSVE_GAL.END   logic equations in text form with comments in English language
RSVE_DOC.TXT   this documentation in German language
RSVE_DOC.ENG   this documentation in English language
BEST*.IMG      assembly plan, scale 1:1
USUNG*.IMG     circuit layout, seen from the upper side, scale 1:1
US*.IMG        circuit layout, seen from the lower (copper) side, scale 1:1

The files with the extension IMG are black/white-GEM-image files. The "*" 
stands for the resolution in dpi, 300 means 300dpi, suitable for laser 
and ink printer and 360 means 360dpi, suitable for 24 pin printer.


Slowness of the ST Computers using TOS
--------------------------------------

Using line speeds beyond 19200 Baud, there is a common problem  with the
ST's operating system and programs for data transfer. If a program uses
the MFP in polling mode, a baud rate of 115200 can be used without
problems by transfering real 11520 cps (characters per second). But if one
uses BIOS I/O routines, an 8 MHz ST can only achieve transfer rates of
2500 with ZMODEM send, and 2000 with ZMODEM receive. If the RTS/CTS-Patch
TURBOCTS is installed, this values rise to approximately 3000 cps. So with
38400 Baud, RTS/CTS handshake is always to be used, because otherwise the ST
would lose characters.

At least the interrupt routine of the ST allow rates of 38400 Baud by
fetching the characters in time, putting them into a buffer and ihibit
sending on the other side of the connection when this buffer is filled
up. However, transfer rates of 57600 bps or 115200 bps are too fast even
for the interrupt routines. They can not fetch the characters sent or
inihibit sending on the sender side fast enough.

If a 16 MHz speeder is installed (e.g. as standard in the MegaSTE),
38400 Baud and 3000 cps are possible, or still more with TURBOCTS).


The assembly plan
-----------------

Parts needed

Quartz oscillator 1.8432 MHz
Binary counter 74HC4040 (normal CMOS 4040 is too slow!)
GAL 16V8, programmed for RSVE
2 ceramic capacitors 100nF
optional: Resistor 1 kOhm, LED

The 74HC4040 should be mounted on the copper side! For this reason its
lettering is shown mirrored in the assembly plan.

Connections in the circuit

+5V    to VCC (5 V) on the main board
GND    to GND on the main board
LED+   anode of the LED
LED-   cathode of the LED
TID    to pin 16 of the MFP
TUA    to pin 7 or pin 10 of the MFP

The LED lights up when one of the extended baud rates is selected.

The MFP usually is lettered MC68901. The pin numbers mentioned here
refer to the 48 pin MFP in DIL housing. If you have a 52 pin MFP in a
Quadpack housing (e.g. in the TT), the following table shows the
relation of the pin numbers:

48 pin      52 pin
Pin 7       Pin 8
Pin 10      Pin 11
Pin 16      Pin 18

On the main board, pin 7, pin 10 and pin 16 are connected to another.
The connection between pin 7 and pin 10 has to be preserved, the
connection of those two pins to pin 16 must be cut. If you cannot find
the corresponding connection on the main board, pin 16 may be cut close
to the board's surface.


Baud rates
----------

Once more the baud rates useable without RSVE:

19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110,
75 (TOS uses 120 instead), 50 (TOS uses 80 instead).

RSVE maps the following baud rates:

150 (selected) -> 115200 (real)
134 (selected) ->  57600 (real)
110 (selected) ->  38400 (real)


Technical short description
---------------------------

TID is the timer D port of the MFP, that normally delivered the baud
rate clock. This is the 16fold baud rate.

The GAL always deliveres 614400 Hz for 38400 Baud anyway (it does not have
to be this way, but was not optimised away because it is quite useful).
With this clock, a 12 bit counter 74CH4040 is fed (only the lower 8 bit
are used), if TID has low (L) level.

Baud   Ticks   Catch range     Effect           BD1   BD2
200     96                     all rates         L     L
150    128     112..135        115200 Baud on    H     L
134    143     136..159         57600 Baud on    H     H
110    174     160..223         38400 Baud on    L     H

Do not use baud rates 50 and 75, because TOS can not set them correctly
anyway. When you put the correct rates into the equation, 75 Bd input
always lead to 75 Bd output (256 ticks modulo 256 = 0) and 50 Bd input
(284 ticks modulo 256 = 128) result in 115200 Bd oputput.

All catch range boundaries are divisible by 8. Therefore the lower three
bits of the counter are not utilized.

Two trick registers contain the counter state at the TID L/H transition.
BD1 becomes active for 112..157 and BD2 for 136..223 (H).

Depending on the content of the trick register, TID, T1 (quartz clock),
T2 (quartz clock / 2) or T3 (quartz clock / 3) becomes asserted to the
output TUA.


Final note
----------

I wish you some happy hours of soldering. My address can be found under
"Copyright".

I distribute a smaller (only 33mm*33mm) ready made version of RSVE.

There is a package of serial drivers, HSMODA*.LZH, programmed by me, which 
I recommend to use together with RSVE. This file (the "*" stands for an 
increasing 2 digit number) should to be find in mailboxes.

Berlin, 12.10.1992

Harun Scheutzow

Translation: April 16, 1994, Peter Eckel
Last modification: July 4, 1994, Harun Scheutzow
