6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 4:07 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Mar 24, 2022 7:52 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
I'm looking for a relatively easy/cheap/small (pick 2?) way to connect a USB keyboard into my Ruby 816 board. (Actually not that board, but something similar).

I know about PS/2 and I know that a lot of "USB" keyboards are really PS/2, but I'm after the ability to use a real USB keyboard, so what I'm after is a "black box" that I can plug the keyboard into then connect that device into the system - either on a parallel interface (which will be through a VIA), or (TTL) serial or SPI.

I know about the devices Kitronics make (based on PIC) - but I'm looking for alternatives. I'd rather not have a PIC that I then have to download code into. (They're also not cheap, but maybe that's the way it is).

And I'm really after first-hand experiences if possible.

It's a tall order, I know and I've spent a few hours this afternoon looking into possibilities but not really found anything that I can say a positive Yes to.

So does anyone have a non PS/2 USB keyboard going into a 6502 system?

Cheers,

Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 8:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
These might be PIC, and I don't have experience, but there are perhaps 5 devices from Hobbytronics which might fit the bill - or prompt further thoughts or search terms. Linked here
https://www.hobbytronics.co.uk/usb-host-keyboard


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 8:11 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
BigEd wrote:
These might be PIC, and I don't have experience, but there are perhaps 5 devices from Hobbytronics which might fit the bill - or prompt further thoughts or search terms. Linked here
https://www.hobbytronics.co.uk/usb-host-keyboard


Ah. Bother. Sorry I meant Hobbytronics, not Kitronics above!

But yes, I know of these - a bit pricey but they're my fall-back solution.

Thanks.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 8:32 pm 
Offline

Joined: Mon Sep 14, 2015 8:50 pm
Posts: 110
Location: Virginia USA
This might work: https://www.versalent.biz/

Cheers,
Andy


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 8:55 pm 
Offline
User avatar

Joined: Sun Dec 26, 2021 8:27 pm
Posts: 182
The USB host capabilities required of such a black box sadly makes it a tall order.
Maybe FPGA-territory. Maybe an Allwinner F1C100s is the cheapest usb host around. (The latter runs Linux)

_________________
---
New new new new new video out! Serial Bootloader for my 65uino
Also, check out: I2C on a 6502 Single Board Computer
and Complete hardware overview of my 6502 SBC R1 :)


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 9:50 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
handyandy wrote:
This might work: https://www.versalent.biz/

Cheers,
Andy


Thanks...

It's pricey.
It needs a separate PSU.
Importing to the UK more or less doubles the price )-:
It's RS232, so not 5v or 3.3v.
The 90's called want their website back....

I'm suspecting this is a USB host capable PIC + MAX232 in a nice box, so if I go that route then it would make much more sense for me to get the ones from Hobbytronics in the UK. (for 1/4 the price or much less if I just buy the PIC and use their free firmware for it)

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 6:55 am 
Offline

Joined: Thu Aug 29, 2019 9:05 pm
Posts: 10
Location: France
Hi, you could also try a CH375 or CH376 board. It costs less than 5€, gives you USB host on one side and parallel 8bit or SPI on the other side. Not a lot of documentation available but enough to make it work. It’s normally meant for usb-host storage, but supports also keyboards and mice.


Last edited by ojanhk on Fri Mar 25, 2022 8:21 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 8:19 am 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
OK it's not 6502, but adding a USB keyboard to a Z80 system I have been involved with:

http://primrosebank.net/computers/mtx/projects/p2skbd/ps2kbd.htm

That uses a propeller to handle the USB or PS2 protocol


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 8:29 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
I think Raspberry Pi Pico can do this and is very cheap. You may also be able to manufacture something based on the RP2040 that is smaller and more tailored to your needs.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 10:31 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
Thanks for the replies. Looks like the CH375 is the way forward (I have no interest in Pi products at the moment, thanks)

Actually that device (CH375) Looks like a really nice thing for retro systems as it can handle a USB 'drive' as well as keyboard, etc. it has a bus level parallel interface as well as serial, works at 3.3v but is 5v tolerant - looks like a winner.

Sadly PS/2 keyboards are becoming just too hard to get now - a friend who bough a batch some time back got lucky and they worked with the passive USB to PS/2 dongles, but the next batch - same seller, same model number didn't have the old PS/2 functionality and were "pure" USB.

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 29, 2022 2:56 pm 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
Popular options for getting a commodity keyboard to work on a small system include:

  • PIC microcontroller with USB interface.
  • 8051 microcontroller with USB interface.
  • AVR microcontroller with USB interface.
  • ARM microcontroller with USB interface.
  • Propeller microcontroller.

A sane solution is to hack of the keyboard's microcontroller and use the raw switch matrix. Oddly, that's the most standard part of a commodity keyboard. Although, my preferred solution is to make my own keyboard which doesn't have cruft like Number Lock and Print Screen.

Regarding USB to PS/2 dongles, they are not universal because the mapping of PS/2 wires is arbitrary. A different dongle may allow a USB keyboard to work as PS/2.

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 30, 2022 12:30 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
Sorry you're not interested in a Pi based solution. I really like the "bare metal" PiGFX serial ANSI terminal running on a $5 Pi Zero with my USB wireless keyboard and mouse and HDMI video monitor. Only caveat is that it refuses to work (for me) with a uSD card 2-gig or larger (I used a 64MB uSD card).


Attachments:
1802 4-chip #4.jpg
1802 4-chip #4.jpg [ 316.72 KiB | Viewed 2833 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 11, 2022 3:59 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
A plain 6502-based solution could be this one https://github.com/fachat/usb65 with custom hardware e.g. here http://www.6502.org/users/andre/hwinfo/usb/index.html http://www.6502.org/users/andre/csa/netusb/index.html or http://www.6502.org/users/andre/csa/usb/index.html

_________________
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: Sun Feb 04, 2024 5:10 pm 
Offline

Joined: Sun Oct 02, 2022 5:52 pm
Posts: 10
Gordon,
Were you able to connect a USB keyboard to your system using the CH375? I'm exploring USB solutions for my system as well, and wondered if you had made any progress. I'm only interested in connecting a USB keyboard.

Thanks,
Jonathan


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 04, 2024 5:25 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
java6502 wrote:
Gordon,
Were you able to connect a USB keyboard to your system using the CH375? I'm exploring USB solutions for my system as well, and wondered if you had made any progress. I'm only interested in connecting a USB keyboard.

Thanks,
Jonathan


No. Abandoned that line of thought and did something else. (Wrote my own bare-metal Pi framework from scratch but that's something for another place and time)

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 31 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: