Serial ports: How are the two Rx lines differentiated?

Nagging hardware related question? Post here!
martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Serial ports: How are the two Rx lines differentiated?

Post by martyn_hill »

Hi everyone

I am perplexed... Referring to the QL service manual and circuits diagram, I am lead to believe that BOTH serial port Rx lines are tied together (via the HAL on issue 6 boards upwards) and applied to both the IPC (std 8049 or Hermes) INT and P20 pins (pins 6 and 21, resp.).

Given that one might be receiving data simultaneously from both serial ports (my assumption), how on earth is the IPC supposed to differentiate the signal levels between the Rx lines of each port?

Confused, of Ealing...


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

Re: Serial ports: How are the two Rx lines differentiated?

Post by ppe »

Hi Martyn,

could it be a documentation error in the service manual? On the cleaned up (redrawn) circuit diagram PDF from Dilwyn's site the wiring is totally different and makes more sense...

I'm feeling too lazy at the moment to open up the BB and check which diagram is correct.... :D

Cheers,
Petri


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Serial ports: How are the two Rx lines differentiated?

Post by martyn_hill »

Hi Petri and thanks for that

I was actually referring to that cleaned-up cct diagram as well (so much better than what we had to use before!).

After the line-receivers, the two Rx lines (named Rx an TX according to DCE/DTE) are routed to the HAL, which in turn, generates the IPCINT which goes back to INT (and P2-0) on the IPC.

No other links between the Rx lines nor HAL back to the IPC are documented...

Next step - to actually trace the lines on the board when I next open up my little BBQL...

Curioser and curioser...


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Serial ports: How are the two Rx lines differentiated?

Post by Silvester »

Re: Given that one might be receiving data simultaneously from both serial ports (my assumption), how on earth is the IPC supposed to differentiate the signal levels between the Rx lines of each port?


Through the handshaking lines.

IIRC the IPC was only originally going to provide one serial port, but two were done by switching between the receive ports (transmit done by ZX8302). Its been a source of trouble with overrun problems ever since...

If you ever monitor the handshake lines of open SER ports you'll see them flickering constantly.

The IPC that was provided with the Schon replacement keyboard, to solve debounce problems, just simply ignored the other port (ser2 IIRC).


David
Nasta
Gold Card
Posts: 443
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: Serial ports: How are the two Rx lines differentiated?

Post by Nasta »

In other words, the QL relies on the sending devices to listen to and react properly to their handshake input lines. If the sending device has no handshake provision, only one serial port can be used for input.
The hardware in the QL itself does not 'mask' the serial line input from a misbehaving sender, so if one device does not use handshake, both input streams can be corrupt, as they are simply 'or-ed'.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Serial ports: How are the two Rx lines differentiated?

Post by RWAP »

This is an interesting discussion - I was wondering how Minerva and Hermes overcome this to some extent, as they allow different baud rates for the two serial ports (Hermes allows split input baud rates, but Minerva allows split output baud rates).... - at least I think that's the right way around... :D


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Serial ports: How are the two Rx lines differentiated?

Post by Silvester »

I'd like to compare the original 8049 source with Lau Reeves Hermes source. Fascinating how he not only solved bugs and made it reliable, but added a few more features.

Learn from the master... :-)


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

Re: Serial ports: How are the two Rx lines differentiated?

Post by ppe »

Is Hermes source code available somewhere?

/Petri


User avatar
1024MAK
Super Gold Card
Posts: 592
Joined: Sun Dec 11, 2011 1:16 am
Location: Looking forward to summer in Somerset, UK...

Re: Serial ports: How are the two Rx lines differentiated?

Post by 1024MAK »

A bit off the topic, but for work I once made a serial port remote switch. This defaulted to a remote dumb" VT100 terminal via a modem and switched to the local port when the local "dumb" VT100 terminal was switched on.

But this did switch the RxD line to the "engineering diagnostic" computer that the terminal were communicating to (the computer was not a normal PC so had no keyboard or display of it's own).

I did not bother switching the TxD lines. So if both terminals were on, the remote user would be able to see the data on the screen, but his/her keyboard would not appear to do anything.

As for the Hermes I'm not sure, as I forget now, but with the SuperHermes there is an enhanced feature set. I did work it out some time back, Alas I forget the details :( so will have to dig out my notes.

Mark


:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :)

QL, Falcon, Atari 520STFM, Atari 1040STE, more PC's than I care to count and an assortment of 8 bit micros (Sinclair and Acorn)(nearly forgot the Psion's)
martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Serial ports: How are the two Rx lines differentiated?

Post by martyn_hill »

Hi everyone - so I wasn't going crazy after-all!

I did notice that, with Hermes fitted (normal, not Super~), the RTS line doesn't 'flicker' like it does with the std 8049.

I happened to observe this when connecting my BBQL to my laptop with 'Realterm' installed - which shows the status of the various lines. Nice bit of open-source software...

Makes sense now - I thought the flickering RTS line under the std 8049 was indicative of some failure!

So Hermes does something special (assuming that simultaneous serial-input actually works - haven't tried it yet!). Given that only INT on the Hermes actually needs to be connected to allow serial input (the 8049 definitely needs both INT and P2-0 connected to - sort-of - work), it obviously does something very differently...

Ever more curious...


Post Reply