QLAN-USB Adapter - working prototype...

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

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

Post by martyn_hill »

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
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

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

Post by martyn_hill »

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
Trump Card
Posts: 171
Joined: Tue Dec 28, 2010 10:23 pm

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

Post by afx »

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
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

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

Post by martyn_hill »

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
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

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

Post by martyn_hill »

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: 695
Joined: Sat Apr 19, 2014 1:30 pm
Location: Italy
Contact:

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

Post by Outsoft »

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: 375
Joined: Fri Nov 19, 2010 5:50 pm
Location: Ormskirk, UK

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

Post by robheaton »

martyn_hill wrote:Wish me luck!
Nice work, looking forward to seeing this in action!


--
If vanpeebles parps in the woods and there is nobody around, does it make a sound?
Timbucus
ROM Dongle
Posts: 49
Joined: Sat Apr 01, 2017 12:14 am

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

Post by Timbucus »

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
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

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

Post by martyn_hill »

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: 49
Joined: Sat Apr 01, 2017 12:14 am

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

Post by Timbucus »

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


Post Reply