Serial Cable DB-9 for German QL Ports

Nagging hardware related question? Post here!
Post Reply
Robbizz
ROM Dongle
Posts: 18
Joined: Mon May 29, 2023 11:23 pm

Serial Cable DB-9 for German QL Ports

Post by Robbizz »

Hi everyone,
I'm trying to make a serial cable for a QL (with German-style serial connectors), to connect it to a Simple WiFi modem with a DB-9 plug (which should fully emulate a WiFi Hayes modem). After doing some research, I came across this wiring diagram:
QL_Tedesco.png
I made a correction — please let me know if I got it wrong — regarding TxD and RxD on SER2, interpreting the German labels Sender and Empfangen as transmit and receive, respectively.
(Sender = transmitter, Empfangen = receive).
Otherwise, SER1 and SER2 would be nearly identical, which we know isn't the case.

Based on this, I built my serial cable (with two male DB-9 connectors) using the following pinout:

Code: Select all

DB-9 Male (German QL)         DB-9 Male (Hayes Modem)

  pin 1   GND   		 →   pin 5  
  pin 2   RxD  			 →   pin 3  
  pin 3   TxD  			 →   pin 2  
  pin 4   DTR  			 →   pin 6  
  pin 5   CTS  			 →   pin 4  
Unfortunately, it doesn’t work, not even when connected to SER1.
I also checked this page: https://dilwyn.theqlforum.com/gen/serial/serial.html
…but it wasn’t helpful in my case.

Does anyone have experience with this setup or suggestions?
Thanks in advance!

PS: I forgot... I managed to successfully make a serial cable to connect a Sinclair QL with BT sockets (6 Pin) to that modem.


User avatar
dilwyn
Mr QL
Posts: 3086
Joined: Wed Dec 01, 2010 10:39 pm

Re: Serial Cable DB-9 for German QL Ports

Post by dilwyn »

High time I removed serial port connection details from my site I think. There will NEVER be agreement on which configurations work and which don't. Some seem to work for some people, some can never get any of them to work. Either way, it's just a simple fact that along with matters relating to zip and unzip, no two people will ever agree on them.


User avatar
tofro
Font of All Knowledge
Posts: 3108
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Serial Cable DB-9 for German QL Ports

Post by tofro »

TxD and RxD are in fact on different pins on ser1_ and ser2_, just like CTS and DTR.

And some of the confusion has a lot to do with the fact that Sinclair (sometimes?) had the weird habit of labelling pins with "what needs to go in here" rather than "what comes out here"-like everyone else does, starting with the ZX81, whose tape output was labeled "MIC" and input labeled as "EAR"). And yes, it's confusing.

My (roughly 25-year-old) notes say:

Code: Select all

 	SER1		SER2
1	GND		GND
2	TxD		RxD
3	RxD		TxD
4	DTR		CTS
5	CTS		DTR
6,7,8 	GND		GND
9	12V
And, if I remember right, my Diablo-630 (a monster daisywheel printer) was happy with that back then.

If your connected device doesn't use HW handshake, the DTR line on the QL end should not be left open, but be connected to +12V, otherwise the QL will never send anything.

(i.e. all pairs are swapped between ser1_ and ser2_)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Robbizz
ROM Dongle
Posts: 18
Joined: Mon May 29, 2023 11:23 pm

Re: Serial Cable DB-9 for German QL Ports

Post by Robbizz »

tofro wrote: Thu May 15, 2025 5:26 pm TxD and RxD are in fact on different pins on ser1_ and ser2_, just like CTS and DTR.

And some of the confusion has a lot to do with the fact that Sinclair (sometimes?) had the weird habit of labelling pins with "what needs to go in here" rather than "what comes out here"-like everyone else does, starting with the ZX81, whose tape output was labeled "MIC" and input labeled as "EAR"). And yes, it's confusing.

My (roughly 25-year-old) notes say:

Code: Select all

 	SER1		SER2
1	GND		GND
2	TxD		RxD
3	RxD		TxD
4	DTR		CTS
5	CTS		DTR
6,7,8 	GND		GND
9	12V
And, if I remember right, my Diablo-630 (a monster daisywheel printer) was happy with that back then.

If your connected device doesn't use HW handshake, the DTR line on the QL end should not be left open, but be connected to +12V, otherwise the QL will never send anything.

(i.e. all pairs are swapped between ser1_ and ser2_)
Ok, so for a minimal configuration I could follow your pinout by also connecting the 6,7.8 pin to the GND? If it doesn't work, then, I should try to connect pin 9 (12 V) to the DTR, did I understand correctly?


User avatar
XorA
Site Admin
Posts: 1631
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Serial Cable DB-9 for German QL Ports

Post by XorA »

Serial port wiring makes a lot more sense when designers use the correct gender of connector (which QL does not).


User avatar
Popopo
Gold Card
Posts: 445
Joined: Wed Apr 07, 2021 10:37 am

Re: Serial Cable DB-9 for German QL Ports

Post by Popopo »

Hi,
Good thread about serials working ports, I was looking for it :)

How many devices were developed for QL that would use Serial ports?


Wicksy
Brittle Membrane
Posts: 123
Joined: Sat Apr 06, 2024 3:32 pm
Location: Australia

Re: Serial Cable DB-9 for German QL Ports

Post by Wicksy »

Popopo wrote: Thu May 15, 2025 11:53 pm How many devices were developed for QL that would use Serial ports?
The obvious, modems, modem adapter, parallel connectors.

Barcode reader, speech synthesizers, micro process controller, serial mouse.


User avatar
tofro
Font of All Knowledge
Posts: 3108
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Serial Cable DB-9 for German QL Ports

Post by tofro »

Robbizz wrote: Thu May 15, 2025 6:08 pm
tofro wrote: Thu May 15, 2025 5:26 pm TxD and RxD are in fact on different pins on ser1_ and ser2_, just like CTS and DTR.

And some of the confusion has a lot to do with the fact that Sinclair (sometimes?) had the weird habit of labelling pins with "what needs to go in here" rather than "what comes out here"-like everyone else does, starting with the ZX81, whose tape output was labeled "MIC" and input labeled as "EAR"). And yes, it's confusing.

My (roughly 25-year-old) notes say:

Code: Select all

 	SER1		SER2
1	GND		GND
2	TxD		RxD
3	RxD		TxD
4	DTR		CTS
5	CTS		DTR
6,7,8 	GND		GND
9	12V
And, if I remember right, my Diablo-630 (a monster daisywheel printer) was happy with that back then.

If your connected device doesn't use HW handshake, the DTR line on the QL end should not be left open, but be connected to +12V, otherwise the QL will never send anything.

(i.e. all pairs are swapped between ser1_ and ser2_)
Ok, so for a minimal configuration I could follow your pinout by also connecting the 6,7.8 pin to the GND? If it doesn't work, then, I should try to connect pin 9 (12 V) to the DTR, did I understand correctly?
6,7,8 is already connected to GND, no need to do that. Connecting 9 to DTR will handle the QL end of things (only). The "other" end might have its own requirements regarding handshake - This will need to be handled as well.
A full recommendation for a cable can only be made once we know this other end's requirements.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
ql_freak
Gold Card
Posts: 498
Joined: Sun Jan 18, 2015 1:29 am

Re: Serial Cable DB-9 for German QL Ports

Post by ql_freak »

It is quite simple once you have understood the transmission of 2 data terminal equipment (DTE, e.g. terminal, computer) with 2 data transmission equipment (DCE, e.g. modem) via a PHONE LINE(! NOT via RS-232!).

Code: Select all

DTE<-- RS-232 -->DCE<-- Telephone Cable (2-Wire-Line) -->DCE<-- RS-232 -->DTE
SER2 on the QL is configured as DTE, so to connect a modem you always should use SER2. SER1 on the QL is configured as DCE, you should use it to connect it to a DTE (e.g. a printer).

In order to obtain reliable connections, the QL should ALWAYS work with hardware handshake (RTS/CTS), but this is not really possible as the QL does not have RTS, but see below (but I'm not sure, it's been too long).

However, the problem with early modems (300 to 2400 baud modems) was that these modems had no buffer (or only a few bytes) and the modem ignored the RTS signal (output at the DTE) (at the latest when the small buffer was full). In addition, the baud rate for SER2 had to be exactly the same as the transmission rate via the telephone line. This was no longer the case with the later high-speed modems (ZyXEL, Courier), which supported hardware handshaking (RTS/CTS). These modems had much larger buffers and even if the transmission speed between the two modems over the telephone line was 14400 baud, the DTEs were connected to the DCEs at a much higher baud rate (19200 for QL with Hermes).

The RTS (Request To Send, output at the DTE) is misleading, by the way. Originally, RS-232 was intended for half-duplex modems and RTS actually meant that the DTE signalled to the DCE (modem) that it wanted to send data. But in the (late?) 80s this was changed and the signal name was also changed to RTR (Ready To Receive). This meant that the DTE signalled to the DCE (modem) that it was ready to receive data. Problem: The QL has no RTS. I'm not sure (it's been too long since I worked with modems on the QL), but it could be that you can use DTR instead, i.e. connect DTR from the QL to RTS from the modem. Anyway, I had stable connections with Hermes and the ZyXEL modem (had the one that supported 19200 baud) and I think I abused DTR from the QL as RTS back then. It's worth a try.

I.e. to connect a modern modem to the QL via SER2:

1. a higher baud rate is selected for SER2 than the actual speed via the telephone line(!).

It is connected as follows (the PIN numbers apply to the English connector on the QL [I don't have the German pin assignment to hand at the moment] and 25-pin/9-pin connector):

Code: Select all

QL-Pin   Signal   25-Pol-Pin  9-Pol-Pin
   1       GND        7           5
   2       TXD        2           3
   3       RXD        3           2
Option 1:
   4       DTR       20           4
Option 2:
   4       RTS        4           7
   5       CTS        5           8
   6       Special QL always +12 volts can be used for special things, e.g. with option 2 as a DTR signal.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
bwinkel67
QL Wafer Drive
Posts: 1524
Joined: Thu Oct 03, 2019 2:09 am

Re: Serial Cable DB-9 for German QL Ports

Post by bwinkel67 »

I've used hardware handshaking on the QL both in the 90s and more recently.


Post Reply