USB Keyboard to 6502... ?

For discussing the 65xx hardware itself or electronics projects.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

USB Keyboard to 6502... ?

Post by drogon »

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/
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: USB Keyboard to 6502... ?

Post by BigEd »

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
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: USB Keyboard to 6502... ?

Post by drogon »

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/
handyandy
Posts: 113
Joined: 14 Sep 2015
Location: Virginia USA

Re: USB Keyboard to 6502... ?

Post by handyandy »

This might work: https://www.versalent.biz/

Cheers,
Andy
User avatar
AndersNielsen
Posts: 185
Joined: 26 Dec 2021
Contact:

Re: USB Keyboard to 6502... ?

Post by AndersNielsen »

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)
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: USB Keyboard to 6502... ?

Post by drogon »

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/
ojanhk
Posts: 11
Joined: 29 Aug 2019
Location: France
Contact:

Re: USB Keyboard to 6502... ?

Post by ojanhk »

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.
Martin A
Posts: 197
Joined: 02 Jan 2016

Re: USB Keyboard to 6502... ?

Post by Martin A »

OK it's not 6502, but adding a USB keyboard to a Z80 system I have been involved with:

http://primrosebank.net/computers/mtx/p ... ps2kbd.htm

That uses a propeller to handle the USB or PS2 protocol
gfoot
Posts: 871
Joined: 09 Jul 2021

Re: USB Keyboard to 6502... ?

Post by gfoot »

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.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: USB Keyboard to 6502... ?

Post by drogon »

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/
User avatar
Sheep64
In Memoriam
Posts: 311
Joined: 11 Aug 2020
Location: A magnetic field

Re: USB Keyboard to 6502... ?

Post by Sheep64 »

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.
User avatar
Michael
Posts: 633
Joined: 13 Feb 2013
Location: Michigan, USA

Re: USB Keyboard to 6502... ?

Post by Michael »

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
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Re: USB Keyboard to 6502... ?

Post by fachat »

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/
java6502
Posts: 12
Joined: 02 Oct 2022

Re: USB Keyboard to 6502... ?

Post by java6502 »

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
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: USB Keyboard to 6502... ?

Post by drogon »

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/
Post Reply