6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 5:27 am

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Apr 06, 2023 4:12 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(Lots of reasons for that last question, but probably off-topic here... suffice it to say, perhaps, that every one of us has a variety of preferences which may shift from project to project, and any expression that something is out of scope is always a personal statement.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 6:27 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
GARTHWILSON wrote:
The Maxim MAX3421E is a USB IC that can act as a host or a peripheral, and is interfaced by SPI.
https://www.analog.com/en/products/max3 ... t-overview


And here is my USB driver code for it that lets the Commodore PET use a USB keyboard and mouse https://github.com/fachat/usb65
It's using the VIA shift register for SPI out, and an external serial to parallel SR to present the received byte to a VIA IO port.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 9:41 am 
Online

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Thanks for that, fachat - the more I look into USB the more complicated it looks!

Neil


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 10:35 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
The reason why USB is so complicated is because it's versatility.

You can dynamically plug in any type of devices, and the drivers have to cope with that. And then you can dynamically unplug devices, which opens a whole new can of problems.

If you have a static setup, it might be going in a simpler way.

André

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 4:19 pm 
Online

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Indeed, André. Something that needs only look for a keyboard (low speed) shouldn't be too difficult, but if you want it to see a wireless dongle not only is it working at the next speed up but it probably needs to talk through a hub - for a mouse/kb combo, for example. That's probably looking at a separate processor to handle things.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 4:41 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
That is the reason my USB stack has 8k or so. It does handle a USB Hub. Unfortunately only for the sh811 (IIRC) USB chip. Not the Max3421. Yet.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 07, 2023 5:07 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
ironically, a lot of modern higher quality USB Keyboards actually pretend to be multiple keyboards plugged into a hub to get around the limitation of how many keys can be pressed at once. the feature is called "n-key rollover".
I think (but i'm not 100% sure) USB Mice do the same to get higher DPI settings to work.
also IIRC non-Bluetooth wireless keyboards/mice just transmit the raw USB packets via radio with no additional controllers or translation inbetween, so they will behave exactly like wired keryboard/mice and therefore don't need any extra code to handle.

and from what i've read online (EE StackExchange) USB hubs seem way simpler than I expected, though i can't tell if that translates into "being simple to handle in code" as well. as you likely have to keep track of what device you're currently talking to, which ones are currently plugged in, etc.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: