Page 1 of 2
USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 7:52 pm
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
Re: USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 8:03 pm
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
Re: USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 8:11 pm
by drogon
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
Re: USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 8:32 pm
by handyandy
This might work:
https://www.versalent.biz/
Cheers,
Andy
Re: USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 8:55 pm
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)
Re: USB Keyboard to 6502... ?
Posted: Thu Mar 24, 2022 9:50 pm
by drogon
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
Re: USB Keyboard to 6502... ?
Posted: Fri Mar 25, 2022 6:55 am
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.
Re: USB Keyboard to 6502... ?
Posted: Fri Mar 25, 2022 8:19 am
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
Re: USB Keyboard to 6502... ?
Posted: Fri Mar 25, 2022 8:29 am
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.
Re: USB Keyboard to 6502... ?
Posted: Fri Mar 25, 2022 10:31 am
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
Re: USB Keyboard to 6502... ?
Posted: Tue Mar 29, 2022 2:56 pm
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.
Re: USB Keyboard to 6502... ?
Posted: Wed Mar 30, 2022 12:30 am
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).
Re: USB Keyboard to 6502... ?
Posted: Mon Apr 11, 2022 3:59 pm
by fachat
Re: USB Keyboard to 6502... ?
Posted: Sun Feb 04, 2024 5:10 pm
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
Re: USB Keyboard to 6502... ?
Posted: Sun Feb 04, 2024 5:25 pm
by drogon
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