QLAN-USB Adapter - working prototype...

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

Re: QLAN-USB Adapter - working prototype...

Postby martyn_hill » Thu May 25, 2017 1:28 pm

Hi Derek!

So, that Teensy clone on eBay appears to be of the v2.0, rather ++2.0, missing some pins and using a lower-spec Atmel uC.

It may well work as I'm barely pushing the Teensy +=2.0 for this adapter - I'll compare against the specs (the PJRC site has detailed specs across the range of versions available) and check against what I am actually employing in the 'QLUB Adpater' (my dubbed name for the device!) and update this thread later.

Between Dave in the US and your good self over here, I'm sure we could fabricate some ready-assembled units and make more accessible to the community :-)

M.


martyn_hill
Trump Card
Posts: 230
Joined: Sat Oct 25, 2014 9:53 am

Re: QLAN-USB Adapter - working prototype...

Postby martyn_hill » Thu May 25, 2017 1:38 pm

Hi again Derek

So, the Teensy v2.0 and its clone from eBay utilise the Atmel ATMEGA32U4 - much like the Arduino equivalent - and which, whilst its has sufficient program (Flash) memory, has only 2.5 KB SRAM, versus 8KB on the uC in the Teensy ++2.0

Presently, my code compiles to around 11KB and uses about 2.5 of global memory - excluding local vars/arrays that I do employ at various points.

Unless I can tune down the SRAM memory usages - all used for Tk2-capable SEND/RECV buffers (a little over 1K each) and the smaller 'Message Queue' - it wouldn't work on the clone in its current form. I'll take a look at memory utilisation at a later time - it is not beyond the realms of impossibility, but not a priority today.

Nice find, though, thank you!


afx
ROM Dongle
Posts: 32
Joined: Tue Dec 28, 2010 10:23 pm

Re: QLAN-USB Adapter - working prototype...

Postby afx » Thu May 25, 2017 6:24 pm

martyn_hill wrote:Between Dave in the US and your good self over here, I'm sure we could fabricate some ready-assembled units and make more accessible to the community


Great, I would like to have one! ...


martyn_hill
Trump Card
Posts: 230
Joined: Sat Oct 25, 2014 9:53 am

Re: QLAN-USB Adapter - working prototype...

Postby martyn_hill » Fri May 26, 2017 9:37 am

Thanks for voicing your support, afx!

Give us some time and our favourite hardware gurus an opportunity to 'productise' my naive designs and we might just get something in your hands!


martyn_hill
Trump Card
Posts: 230
Joined: Sat Oct 25, 2014 9:53 am

Re: QLAN-USB Adapter - working prototype...

Postby martyn_hill » Mon Jun 05, 2017 1:02 pm

Hi everyone!

Quick update on this project...

I have now updated the (Teensy) microcontroller firmware to successfully receive packets over QLAN, to compliment the already working sending code.

Still to do:
1. Devise and implement a timeout mechanism for packet receive/send (either autonomously in the microcontroller, or else via the Message Queue - to explicitly cancel a previous Send/Receive request after a given timeout).
2. To devise and implement more efficient/sophisticated memory allocation within the microcontroller's 8KB RAM.
3. To devise and implement the Tk2 Broadcast send/receive protocol in the microcontroller (extended SCOUT plus positive/negative ACK capability.)
4. To finally start writing the Message Queue (MQ) and interface between the Tk2 network driver and the MQ in assembler and then to link-in to SMSQ/E.
5. Further hardware improvements (Dave has some good ideas that we're discussing offline) to make the device ready to 'productise' for those who want to purchase a ready-built solution rather than build their own. That's for later...

Wish me luck!


User avatar
Outsoft
Super Gold Card
Posts: 569
Joined: Sat Apr 19, 2014 1:30 pm
Location: Italy
Contact:

Re: QLAN-USB Adapter - working prototype...

Postby Outsoft » Mon Jun 05, 2017 8:12 pm

martyn_hill wrote:Hi everyone!

Quick update on this project...

I have now updated the (Teensy) microcontroller firmware to successfully receive packets over QLAN, to compliment the already working sending code.

Still to do:
1. Devise and implement a timeout mechanism for packet receive/send (either autonomously in the microcontroller, or else via the Message Queue - to explicitly cancel a previous Send/Receive request after a given timeout).
2. To devise and implement more efficient/sophisticated memory allocation within the microcontroller's 8KB RAM.
3. To devise and implement the Tk2 Broadcast send/receive protocol in the microcontroller (extended SCOUT plus positive/negative ACK capability.)
4. To finally start writing the Message Queue (MQ) and interface between the Tk2 network driver and the MQ in assembler and then to link-in to SMSQ/E.
5. Further hardware improvements (Dave has some good ideas that we're discussing offline) to make the device ready to 'productise' for those who want to purchase a ready-built solution rather than build their own. That's for later...

Wish me luck!


Great job!!!


User avatar
robheaton
Site Admin
Posts: 241
Joined: Fri Nov 19, 2010 5:50 pm
Location: Ormskirk, UK

Re: QLAN-USB Adapter - working prototype...

Postby robheaton » Sat Jun 10, 2017 12:06 pm

martyn_hill wrote:Wish me luck!


Nice work, looking forward to seeing this in action!


Current Retro Hardware :-
ZX80 Clone, ZX81 + Chroma + ZXPand + Zeddynet, Just Speccy 128, BB Sinclair QL + Trump Card Clone, Aurora + Super GC + QubIDE.
BBC Model B 32k + Datacenter + Z80 Tube, BBC Master 128k + Datacenter & 6502 Tube.
Commodore 64.
Timbucus
ROM Dongle
Posts: 40
Joined: Sat Apr 01, 2017 12:14 am

Re: QLAN-USB Adapter - working prototype...

Postby Timbucus » Sat Jun 10, 2017 12:29 pm

Am I correct in thinking that I would need a ROM copy of TKII on the real QL to allow this to be used due to timing and/or will the built in QL networking software allow some functionality for software transfer at least?

It sounds ideal as I am currently using a serial port or removing my QUBIDE SD card and that has nearly driven me to consider writing a native SD card file system for Linux - which I am sure is far more difficult than my optimistic brain understands...

Even if I did it would not resolve the Power Off, remove Card, only the DD to image, use HABI in wine etc bit.

Tim


martyn_hill
Trump Card
Posts: 230
Joined: Sat Oct 25, 2014 9:53 am

Re: QLAN-USB Adapter - working prototype...

Postby martyn_hill » Sat Jun 10, 2017 12:47 pm

Hi Tim!

The adapter I'm developing would allow your PC (or potentially, MAC) -based QL Emulator to connect via the QLAN to unexpanded QL's perfectly well, without the need for Tk2 on ROM at the QL end.

I'm testing using QPC on a PC laptop, but as long as the emulator/host being run supports serial comms - via the USB virtual serial-port presented by the microcontroller, any QL with (working) NET ports should be fine at the remote end.

Obviously, Tk2 Networking is a big step-up from the built-in NET capability of an unexpanded QL, but none-the-less, the adapter will support both setups.

Regards,
Martyn.


Timbucus
ROM Dongle
Posts: 40
Joined: Sat Apr 01, 2017 12:14 am

Re: QLAN-USB Adapter - working prototype...

Postby Timbucus » Sat Jun 10, 2017 2:39 pm

Martin

Thanks for the prompt reply - I'm sure as uQLx and ZEsarUX seem to be under active development (include source) serial support should not be an issue on the Linux end - as of course I am one of THOSE users - without a beard though, in case the stereotype is flashing into peoples brains..

Tim



Return to “Hardware”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests