Page 1 of 2

Serial port confusion.

Posted: Thu Sep 02, 2021 1:02 pm
by mselkin
Hi everyone,

I am sure this has been discussed before, but I am trying to understand the serial port pinouts.

I would like to make my own cable, where one end plugs into the QL serial 2 port (a QL BT connector) and the other end (a DB 9 connector), will plug into the serial port of a wifi modem emulator.
I am finding conflicting, confusing serial port information on the internet and when I look at various ready made serial cables on eBay, they often seem to be wired differently.

I have seen:

QL BT connector Modem DB9 serial port
1 5
2 3
3 2
4 4
5 8

or

QL BT connector Modem DB9 serial port
1 5
2 3
3 2
4 8
5 7

and sometimes 2 to 2 and 3 to 3, instead of crossed

Note, I am not trying to make a 'null modem cable' to connect the QL directly to a PC serial port, but rather simply a QL BT to DB9 converter, in other words, the DB9 side of my cable would be the QL's serial port as a DB9 connector, rather than a BT connector and I would still use a serial cable with DB9 on each side to go between my port converter to the modem.

I am a beginner hobbiest and any help to enhance my understanding and settle my confusion would be appreciated.

Mark

Re: Serial port confusion.

Posted: Thu Sep 02, 2021 2:18 pm
by Andrew

Re: Serial port confusion.

Posted: Thu Sep 02, 2021 2:29 pm
by mselkin
Thank you,

I have seen that diagram but I was of the understanding that those connections were specifically for a mouse, or am I wrong?

Re: Serial port confusion.

Posted: Thu Sep 02, 2021 2:30 pm
by NormanDunbar
If you need to know anything about the QL, Dilwyn's site is the font of all knowledge. http://www.dilwyn.me.uk/docs.

If you need details of SuperBASIC, and almost all other toolkits, plus lots of other stuff, https://superbasic-manual.readthedocs.io/en/latest/.

We also have a Wiki at https://qlwiki.qlforum.co.uk/doku.php.

Enjoy, and welcome to the mad house!

Cheers,
Norm.

Re: Serial port confusion.

Posted: Thu Sep 02, 2021 3:19 pm
by Andrew
mselkin wrote:I have seen that diagram but I was of the understanding that those connections were specifically for a mouse, or am I wrong?
Those connections convert QL serial port to DB9 - same pin layout as on PC.

Re: Serial port confusion.

Posted: Thu Sep 02, 2021 3:21 pm
by mselkin
Thank you all for your replies.
I think I understand now.
Waiting for modem emulator to arrive and then will test the cable.

Re: Serial port confusion.

Posted: Thu Mar 10, 2022 6:38 pm
by Derek_Stewart
Hi,

What is the best SER2 to Simulant WIFI Modem?

I note on eBay, that a SER2 to DB9 cable is;

Code: Select all

SER2     DB9
1. GND    5. GND
2. TxD    3. TxD
3. RxD    2. RxD
4. DTR    4. DTR
5. CTS    6. CTS
6. 12v    9. RI
Maybe this changes should be made:

Code: Select all

SER2      DB9
1. GND    5. GND
2. TxD    3. TxD
3. RxD    2. RxD
4. DTR    4. CTS
5. CTS    6. RTS
6. 12v    9. RI
How about the 12v connected to the DB9 DTR

Re: Serial port confusion.

Posted: Fri Mar 11, 2022 6:50 pm
by Derek_Stewart
Hi,

All sorted now, I forgot all about comms cable.

But looking at the QTPI documentation this defines what is required

Code: Select all

SER2     DB9
1. GND    5. GND
2. TxD    3. TxD
3. RxD    2. RxD
4. DTR    7. RTS
5. CTS    8. CTS
6. NC
note QL Pin 4 is actually a RTS rather than a DTR.

I connected this cable from a Trump Card QL with 8049 to Simulant Wifi Modem, which worked after setting Hayes register S54=2 which is DTR high.

Next step replace 8049 with Hermes.

Re: Serial port confusion.

Posted: Wed Mar 23, 2022 6:18 pm
by skullandbones
Part of the confusion is due to the "RS-232" specifications changing over the last 60 odd years.

See https://en.wikipedia.org/wiki/RS-232

Note that there are also equivalent European specifications known as ITU-T V.24 and V.28. These specifications can be easier to understand than the American "RS-232" specifications.

There was a major change in 1997 that repurposed the RTS pin to mean "Ready to Receive" aka RTR.

In the 1980s and earlier, 9-pin D type connectors did not exist for "RS-232", instead 25-pin D types were used. But critically, the hardware flow control supported only one of the transmission lines and operated in a 3-way handshake between DTR, CTS and RTS. The QL was designed with this standard in mind and therefore DTR is valid.

In the 1990s, PC manufacturers started to add 9-pin D-types for "RS-232" but these were not codified into the "RS-232" specifications until 1997. These 9-pin D types use the logical RTR meaning for RTS to allow for full-duplex hardware flow control to be supported for both transmission lines. Unfortunately, the RTS pin was never relabelled to be RTR.

Even after 20 years of the specifications being released, people still say RTS is "Request to Send" which is not how it works as that is the old standards. If you think RTR, "Ready to Receive" then you get less confused about how the hardware flow control works. I even see software programmers today and hardware manufacturers continuing to use the defunct term "Request to Send". I guess few people use first principles and consult the actual 1997 specifications.

In conclusion, DTR can be used instead of RTS aka RTR because DTR indicates a readiness that the device is ready to receive.

Re: Serial port confusion.

Posted: Wed Mar 23, 2022 6:23 pm
by tofro
And a big part of the confusion has been caused by Sinclair themselves in that ser1_ and ser2_ are not the same.