Welcome, Guest. Please login or register.

Author Topic: Teensy 2.0 Amiga keyboard to USB adapter  (Read 2130 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline hishamkTopic starter

Teensy 2.0 Amiga keyboard to USB adapter
« on: June 08, 2021, 04:23:51 PM »
I had a Teensy 2.0 lying around and decided to build a little Amiga keyboard to USB converter with it; since you know, Teensy is great for such HID stuff.

I might add a few more key maps.

Tested so far with my Amiga 3000 and CDTV keyboards on my Mac and Orange Pi Zero.

https://github.com/hishamk/teensy-amiga-keyboard


« Last Edit: June 09, 2021, 06:03:23 AM by hishamk »
2x A1000, 2x A2000, 1x A3000, 4x A1200, 3x A500, 1x CDTV, 1x CD32, 2x Pegasos II, 1x EFIKA
 

Offline walkero

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #1 on: June 09, 2021, 11:35:26 AM »
That is awesome. I was looking for something like that. I have a couple of keyboards that I'd love to use with my computers. Do you know if it works fine with A4000 and A2000 keyboards?

Also, it would be great if you could add some info at the github about how to connect the keyboard on Teensy. Also, because I am not familiar with Teensy,  are there different versions or revision which we should avoid? It would be nice if you could propose a specific one as a reference.

And finally, I don't know if you plan to do it, I would like to see on github some more info in case someone program teensy and what they could change to program keys differently.

Do you plan to implement and sell a whole product around that? If yes, I would be interested.
 

Offline hishamkTopic starter

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #2 on: June 09, 2021, 11:29:08 PM »
Thanks, I've added a bit more info about the connections. I don't have an Amiga 4000 keyboard, but I think they're essentially the same even though they have a different connector. I.e. you'll just have to figure out which pin is which.

As for the Teensy, you could probably use any model with native USB support, but the cheap Teensy 2.0 remains the most economical option. Anything else would be overkill really.

I'll add a bit more to the keymap handling in the next few days, including dynamic switching since I have both US and UK keyboards and would like to be able to switch between the two using a specific key press combo. That being said, adding new keymaps is trivial for someone looking at the code, it's essentially an array look up table ordered as per the Amiga keymap codes paired to their Teensy USB counterparts.

At this time, I'm not planning on this being more than just a nice weekend project to give back to the community. I'll be sure to post something if I decide to build a few units.


2x A1000, 2x A2000, 1x A3000, 4x A1200, 3x A500, 1x CDTV, 1x CD32, 2x Pegasos II, 1x EFIKA
 

Offline walkero

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #3 on: June 10, 2021, 10:34:19 AM »
Thanks for your continuous work on that.
While I was searching info about Teensy, I found the following page https://joeyvigil.github.io/MechanicalKeys/tutorial
There it says at a point

Quote
Two types of Micro-Controllers are common; Teensy 2.0 and Teensy++ 2.0. The Teensy 2.0 will work for keyboards with less than 80 keys. The rest will require a Teensy++ 2.0.

I guess you used Teensy 2.0 because the number of keys are less than 80, but if there is a need to use that keyboard with a PC, there should be a way to cover the rest of the keys, right? This can be done with combination of keys, for example Right Amiga + F10 to be used as F12? To cover the rest of the keys, does it need the Teensy++ 2.0 or the Teensy 2.0 will be enough?

Sorry for my ignorance. I am not familiar on how Teensy is working.

 

Offline hishamkTopic starter

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #4 on: June 10, 2021, 11:33:59 AM »
That document is referring to hardwiring actual keys to the Teensy's I/O pins.

We don't do that, we just use the Teensy to translate the signals from the Amiga to USB, so we can have a 400-key Amiga keyboard and it wouldn't make a difference :) The current US map I use has 104 key code locations.


2x A1000, 2x A2000, 1x A3000, 4x A1200, 3x A500, 1x CDTV, 1x CD32, 2x Pegasos II, 1x EFIKA
 

Offline walkero

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #5 on: June 10, 2021, 12:20:57 PM »
You are right. Because, I guess, there is actually a controller inside the keyboard that translates all key pressing to a couple of lines at the end of the cable, right?
Have you experienced any problems with combination not working, for example pressing left and top arrow together or anything else?
 

Offline hishamkTopic starter

Re: Teensy 2.0 Amiga keyboard to USB adapter
« Reply #6 on: June 11, 2021, 12:05:11 PM »
Correct. The 6570 keyboard controller is actually based on the 6500/1, which is based on the 6502 CPU.

I haven't had any issues yet with combo keys.
2x A1000, 2x A2000, 1x A3000, 4x A1200, 3x A500, 1x CDTV, 1x CD32, 2x Pegasos II, 1x EFIKA