8302 pinout help request...

Nagging hardware related question? Post here!
Nasta
Gold Card
Posts: 443
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: 8302 pinout help request...

Post by Nasta »

Jan, are you sure the 8302 serial transmit has independent baud rates for the two outputs? I'm not sure they can actually really transmit at the same time...


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: 8302 pinout help request...

Post by janbredenbeek »

Nasta wrote:Jan, are you sure the 8302 serial transmit has independent baud rates for the two outputs? I'm not sure they can actually really transmit at the same time...
They never transmit both at the same time, there is always interleave between bytes (there's probably only one shift register which might also be used for MDV since serial output has to wait for the MDV's to stop). However Minerva allows for different baud rates for SER1 and SER2 when Hermes is present (because Hermes does not rely on the BAUDX4 line). This is documented in the Minerva source (MT.BAUD call and iser.asm). This feature was added somewhere in the 1.9x versions and hence not yet documented in the user guide.

Jan.


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

Re: 8302 pinout help request...

Post by Nasta »

That means Minerva might well change the baud rate field in the register as it services interrupts for serial transmit, to get different baud rates. To be honest, this looks like one more reason to keep one non-multiplexed serial port.
Do you perhaps know if the same shift register is used for the QL net?


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: 8302 pinout help request...

Post by janbredenbeek »

Nasta wrote:That means Minerva might well change the baud rate field in the register as it services interrupts for serial transmit, to get different baud rates. To be honest, this looks like one more reason to keep one non-multiplexed serial port.
Do you perhaps know if the same shift register is used for the QL net?
No, the network is a simple 'bit banging' port. Actually, you can use the same bit (7 of PC.TCTRL) to bit-bang the serial output line in software, which was used in the Qterm software supplied with the Miracle modem to achieve 1200/75 split baud rate (this was the 1200S75 mode).
An explanation in the Minerva source code:

Code: Select all

*************** pc_tctrl transmit control register values
* The values set in bits 4..3 of the transmit control register select the
* device to which data written to pc_tdata applies.
* At boot, zero is written here. A zero was also written to pc_tdata, but this
* has been removed. It had the effect of sending a spurious null to the ser1
* port, which should not have been done.

pc..diro equ    7       direct output (e.g. to network)
*   ?    equ    6       0
*   ?    equ    5       0
pc..serb equ    4       0=serial io
pc..sern equ    3       serial port number
*baud2  equ     2       \
*baud1  equ     1        > three bit baud rate
*baud0  equ     0       /

pc.bmask equ    %00000111       baud rate mask
pc.notmd equ    %11100111       all bits except mode control
pc.mdvmd equ    %00010000       microdrive mode
pc.netmd equ    %00011000       network mode
Jan.


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

Re: 8302 pinout help request...

Post by Dave »

Do you happen to know the baud rates indicated by the three bits?

I wanted to hook up a fast serial device, and the low cost fast way to do it was to use an FTDI FT245 parallel to USB IC in driverless mode, then put that output into a CH340G USB to serial converter. The link is running at 230,400 bps right now, but access to it is just how fast you can throw bytes at it.

There is some work to do on configuration, but I'll publish the results/howto when it's more... evolved.

Edit to add:

It's a PITA, BTW.

I have to configure both ICs using the FTDI drivers first. So, I have to power them up and hook them up to USB on a PC (I'm a Mac user) and configure them so they operate. The plan is to get the logic analyzer on them and record the configuration transaction to each IC, then work out how to reproduce it to configure the ICs with a configuration byte sequence from the QL. I'd also have to configure the first IC, then once that passes through configure the second IC.

That said, it's still a cheap and easy way to get an incredibly fast parallel to serial converter with just a handful of components for less than $4.


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: 8302 pinout help request...

Post by janbredenbeek »

Dave wrote:Do you happen to know the baud rates indicated by the three bits?
These are the standard QL baud rates in reverse order. 000 = 19200, 001 = 9600 etc, down to 75 for 111.
The 8302 can probably go much faster than that since it has to drive the Microdrives using the same shift register (controlled by bits 3 and 4 of PC.TCTRL).

Jan.


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

Re: 8302 pinout help request...

Post by Nasta »

000 = 19200
001 = 9600
010 = 4800
011 = 2400
100 = 1200
101 = 600
110 = 300
111 = 150
??? = 75?

Also, it probably can't go much faster without a serious baud rate error accruing.
If it uses a 4x oversample for baud rate (visible at BAUDX4), and the base is the 7.5MHZ clock, ideally for 19200 the divisor would be 97.65625.
Does it not use some sort of FM modulation for microdrives?


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

Re: 8302 pinout help request...

Post by Nasta »

janbredenbeek wrote: No, the network is a simple 'bit banging' port. Actually, you can use the same bit (7 of PC.TCTRL) to bit-bang the serial output line in software, which was used in the Qterm software supplied with the Miracle modem to achieve 1200/75 split baud rate (this was the 1200S75 mode).
An explanation in the Minerva source code:

Code: Select all

...
Jan.
Interesting, I was under the impression the net port was a real shift register and only the various protocol timings were implemented in software.
I stand corrected :)


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: 8302 pinout help request...

Post by janbredenbeek »

Nasta wrote: 110 = 300
111 = 150
??? = 75?
150 baud doesn't exist. It jumps from 300 to 75.
Also, it probably can't go much faster without a serious baud rate error accruing.
If it uses a 4x oversample for baud rate (visible at BAUDX4), and the base is the 7.5MHZ clock, ideally for 19200 the divisor would be 97.65625.
Does it not use some sort of FM modulation for microdrives?
Yes, but that's probably handled by the electronics on the MDV boards.

Jan.


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: 8302 pinout help request...

Post by janbredenbeek »

Nasta wrote: Interesting, I was under the impression the net port was a real shift register and only the various protocol timings were implemented in software.
I stand corrected :)
The good old Sinclair adagium: "Never do it in hardware if it can be done in software" :D
On the other hand, the network is a simple CSMA/CD half-duplex circuit (unlike the SER ports) and the software has to sense its state while transmitting - I guess using a hardware shift register would make things much more complex.

Jan.


Post Reply