Linux QL RS232 cable wiring

Nagging hardware related question? Post here!
Post Reply
tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Linux QL RS232 cable wiring

Post by tcat »

Dear All,

Would anyone help with an RS232 cable wiring between Linux and QL?
Linux standard tty terminal driver does not use DTR / DSR
signals, only RTS / CTS lines for handshaking

So to connect a QL with a Linux system, I was thinking of this cable wiring, but not sure.

QL <==> Linux
/////////////////////////
TX <==> RX
RX <==> TX
CTS <==> RTS
DTR <==> CTS
OV <==> 0V
9V <==> 9V

On the same analogy, could I also connect a ZX Spectrum's Interface1 with the same cable?

My idea is to exchange data between QL or ZX and Linux, by typing on the command line, e.g.

# setting up baud rate, h/w handshake, stop bits, etc
$ stty -F /dev/ttyS1 19200 cs8 clocal cstopb raw crtscts

# sending data down
$ cat file.in > /dev/ttyS1

# receiving data up
$ cat /dev/ttyS1 > file.out

Many thanks in advance


User avatar
ppe
Trump Card
Posts: 171
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: Linux QL RS232 cable wiring

Post by ppe »

Hi,

you can find useful information on the serial port on Dilwyn's wonderful QL pages:
http://www.dilwyn.me.uk/docs/hardware/index.html The file "serials.txt" inside downloadable "serials.zip" should have all the information you need.

Cheers,
Petri


User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: Linux QL RS232 cable wiring

Post by Mr_Navigator »

I wrote an article for QL User many years ago for that very purpose, the article contained the necessary connections for Interface 1 and the QL, I will try and dig it out if you still need the information.
Untitled-2.png
Untitled-2.png (141.48 KiB) Viewed 8051 times


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
User avatar
dilwyn
Mr QL
Posts: 2760
Joined: Wed Dec 01, 2010 10:39 pm

Re: Linux QL RS232 cable wiring

Post by dilwyn »

Mr_Navigator wrote:I wrote an article for QL User many years ago for that very purpose, the article contained the necessary connections for Interface 1 and the QL, I will try and dig it out if you still need the information.
To save Mr Navigator some time, being as he's busy making Quanta magazines, and as I happened to have that particular issue to hand...


User avatar
Dave
SandySuperQDave
Posts: 2775
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: Linux QL RS232 cable wiring

Post by Dave »

*cough-splutter*

I remember that article! I am at the feet of greatness!


User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: Linux QL RS232 cable wiring

Post by Mr_Navigator »

QL User phoned me on a Friday asking for the article based around what I sent them which was the program, the lead and the briefest of instructions, they wanted it sent out in the post on the following Monday. Typing this all up on the Saturday I was very excited about the prospect. Written in Quill, I made my final changes on Sunday morning, and went to save as normal. As instructed by most programs of the time, save regularly, which I did. On this occasion however during the save my AH ROM QL locked up and I lost everything. :cry: The article had to be rewritten, but it wasn't the same and no time to do proper proof-reading. Since then and even now my save routines are always double saves so that in the event of a lock-up I can at least recover something.


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
JonB
Bent Pin Expansion Port
Posts: 78
Joined: Thu Mar 28, 2013 4:44 pm

Re: Linux QL RS232 cable wiring

Post by JonB »

So.. how do you set up the baud rate and handshake on the QL?

I've got mine connected to a Mac via a serial adapter, and so far nothing from SER2. Plugging it into SER1 gives gibberish with noting actually being sent.

I need a simple bit of SBasic to test the link is correct..


User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: Linux QL RS232 cable wiring

Post by Mr_Navigator »

Baud rate is fairly straight forward using the BAUD command followed by the rate see online user guide below.

http://www.dilwyn.me.uk/docs/ebooks/olq ... s.htm#baud

Never got involved with handshaking, just used the wiring as per spec.


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
User avatar
dex
Gold Card
Posts: 286
Joined: Thu Dec 23, 2010 1:40 pm

Re: Linux QL RS232 cable wiring

Post by dex »

I have bought converting cables for the UK QL here: http://www.thesinclairshop.com/
Although nice looking (and a big bit expensive), they have one disadvantage: they don't work on the QL (I didn't test them with ZX Spectrum 128+, which has the same serial connector).

The solution is to disassembly the PC side connector (Canon 9) of the cable, and to resolder (red) wire from pin 4 to pin 7.
Serial communication works then perfectly (tested using Mac connected via USB-serial convertor to SER1; I didn't test it with SER2 yet).


User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: Linux QL RS232 cable wiring

Post by Mr_Navigator »

Very colourful the Sinclair Shop

Image


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
Post Reply