Serial port confusion.
Serial port confusion.
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
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.
See here the connections for Ser2 http://www.dilwyn.me.uk/docs/hardware/s ... daptor.jpg
Re: Serial port confusion.
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?
I have seen that diagram but I was of the understanding that those connections were specifically for a mouse, or am I wrong?
- NormanDunbar
- Forum Moderator
- Posts: 2281
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Leeds, West Yorkshire, UK
- Contact:
Re: Serial port confusion.
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.
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.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Re: Serial port confusion.
Those connections convert QL serial port to DB9 - same pin layout as on PC.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?
Re: Serial port confusion.
Thank you all for your replies.
I think I understand now.
Waiting for modem emulator to arrive and then will test the cable.
I think I understand now.
Waiting for modem emulator to arrive and then will test the cable.
-
- Font of All Knowledge
- Posts: 3975
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Serial port confusion.
Hi,
What is the best SER2 to Simulant WIFI Modem?
I note on eBay, that a SER2 to DB9 cable is;
Maybe this changes should be made:
How about the 12v connected to the DB9 DTR
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
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
Regards,
Derek
Derek
-
- Font of All Knowledge
- Posts: 3975
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Serial port confusion.
Hi,
All sorted now, I forgot all about comms cable.
But looking at the QTPI documentation this defines what is required
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.
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
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.
Regards,
Derek
Derek
-
- ROM Dongle
- Posts: 4
- Joined: Sun Mar 20, 2022 5:55 pm
Re: Serial port confusion.
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.
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.
And a big part of the confusion has been caused by Sinclair themselves in that ser1_ and ser2_ are not the same.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO