Ethernet for the QL

Nagging hardware related question? Post here!
User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Ethernet for the QL

Post by Peter »

Martin_Head wrote:I also use the QL's hardware RTC clock (PC_CLOCK is it?) in places.
Yes, this is identical to the QL.
Pr0f wrote:From a very quick digest of the datasheet for the CP2200, the places where a timer may be required:
[...]
Waiting for Flash Write - the write itself is done by hardware and no timers are required to manage the write - only to verify the process has completed - again it's flagged on interrupt register.
The Flash does not need to be written.


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Ethernet for the QL

Post by Peter »

Pr0f wrote:I don't know how latent the external interrupt line is (as that would have to be used if not polling for interrupt statuses on the default interrupt scheduler.
This latency is not predictable as other interrupt handlers use the same level.


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Ethernet for the QL

Post by NormanDunbar »

Peter wrote:Happy new year Norman! That with your level looks like British understatement to me. ;)
Nah, no understatement, I'm a "trainee" hardware guy, better at software - most of the time!


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.
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Ethernet for the QL

Post by Derek_Stewart »

Peter wrote:
Derek_Stewart wrote:Maybe the Qubide Ram card could be modified to have Ethernet integrated into the circuit board. I say this as the circuit board schematics are available.
I'm not sure which exact card you mean, can you post a link maybe?

Ideally, the solution would also allows an (S)GC. I didn't have an idea how this could be done, except with a backplane.
I meant the Qubide Ram IDE Card by José Leandro, which connects to a standard QL.

But I guess the SGC is requirrd for the faster processor.


Regards,

Derek
User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Ethernet for the QL

Post by Peter »

Derek_Stewart wrote:I meant the Qubide Ram IDE Card by José Leandro, which connects to a standard QL.
Do you mean this one? http://hardware.speccy.org/temp/qubide-i.html


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Ethernet for the QL

Post by Derek_Stewart »

Peter wrote:
Derek_Stewart wrote:I meant the Qubide Ram IDE Card by José Leandro, which connects to a standard QL.
Do you mean this one? http://hardware.speccy.org/temp/qubide-i.html
Yes thats the one...

Maybe a dedicated expansion woukd be better, which could be connected tontge Super Gold Card with a Mini Back Plane: viewtopic.php?f=2&t=1945&hilit=mini+bac ... =30#p17649


Regards,

Derek
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Ethernet for the QL

Post by Martin_Head »

Pr0f wrote:From a very quick digest of the datasheet for the CP2200, the places where a timer may be required:

Waiting for initialization after clock stabilized - this could be done simply by checking the interrupt flags to see if we got that interrupt or not - and wait on an interrupt polling loop until it was received.

Waiting for Flash Write - the write itself is done by hardware and no timers are required to manage the write - only to verify the process has completed - again it's flagged on interrupt register.

Reading packets from FIFO buffer in the CP2200 after interrupt - there is conditional requirement these are read withing 51.2us of the interrupt, otherwise a random read must be used rather than autoread. I don't know how latent the external interrupt line is (as that would have to be used if not polling for interrupt statuses on the default interrupt scheduler.

The chip seems to take care of a lot of the very low level stuff, provided it is serviced quickly by it's interrupt handler.
I had a quick look at where I use the hardware timer. I use it in about a dozen places.

1. For timing the route time in PING. which can be less than 1mS
2. As a random number generator for the TCP Sequence numbers
3. In the CP2200 initialization. 10 Seconds, 2mS, and 4 Seconds. There is also a 2mS, 1.5 Second, and a 250mS in the Auto-negotiation (Which is not yet implemented)
4. A 1 second delay when writing a packet to the CP2200

Without looking closely. I think A lot of the delays, will wait up to the time specified before deciding something went wrong.


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Ethernet for the QL

Post by Peter »

Many thanks Martin! Apparently I underestimated how useful the Q68 high resolution timer is...

It's surely possible to do without the 2 ms for initialization and autonegotiation, so the accuracy of PING looks like the only severe issue when a 20 ms / 50 Hz timer is used.

But removing the Q68 timer dependency causes more driver changes that I thought. If a little PLD could be used instead of a GAL, maybe a hardware timer should actually be implemented for a QL ethernet card.


User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Ethernet for the QL

Post by Pr0f »

One other possibility is to drop a 68901 device on the 'LAN Card' and use it to provide both the timers (the device has 4 available), and take the interrupt signal from the CP2200 as well, which then also solves that issue. Possibly a little overkill...


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Ethernet for the QL

Post by Peter »

The MC68901 sounds like a nice idea, since a good UART is also needed for the QL. But how about the large 48 pin DIL case and the fact that it is obsolete?


Post Reply