Linux QL RS232 cable wiring

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

Linux QL RS232 cable wiring

Postby tcat » Wed Apr 10, 2013 6:41 pm

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
Bent Pin Expansion Port
Posts: 88
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: Linux QL RS232 cable wiring

Postby ppe » Wed Apr 10, 2013 7:01 pm

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

Postby Mr_Navigator » Thu Apr 18, 2013 10:39 am

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 4553 times


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

Re: Linux QL RS232 cable wiring

Postby dilwyn » Thu Apr 18, 2013 12:42 pm

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...
Attachments
rs232_page2.jpg
Article page 2 of 2
rs232_page1.jpg
Article page 1 of 2


Dilwyn
All things QL: see www.dilwyn.me.uk
User avatar
Dave
SandySuperQDave
Posts: 2429
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: Linux QL RS232 cable wiring

Postby Dave » Thu Apr 18, 2013 4:58 pm

*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

Postby Mr_Navigator » Thu Apr 18, 2013 10:09 pm

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
Chuggy Microdrive
Posts: 60
Joined: Thu Mar 28, 2013 4:44 pm

Re: Linux QL RS232 cable wiring

Postby JonB » Fri Apr 19, 2013 3:48 pm

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

Postby Mr_Navigator » Sat Apr 20, 2013 11:05 am

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/olqlug/QL%20Manual%20-%20Keywords.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
Trump Card
Posts: 210
Joined: Thu Dec 23, 2010 1:40 pm

Re: Linux QL RS232 cable wiring

Postby dex » Mon Apr 22, 2013 11:59 pm

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

Postby Mr_Navigator » Wed May 08, 2013 8:43 pm

Very colourful the Sinclair Shop

Image


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

Who is online

Users browsing this forum: No registered users and 5 guests