XT/AT/PS2/Terminal to USB Converter with NKRO

User avatar
Igthorn

15 Jul 2014, 00:18

beltet wrote: Do anyone here use a pro micro with soarers converter? Thinking of buying a bunch of them for it.
Little of topic but how many pins can you use on the pro micro for a controller?

Sincerly
For the converter you only need 4 pins. BCG shows the pinout for converter on pro micro.
http://deskthority.net/workshop-f7/teen ... ml#p124124


For the controller, you can use 18 pins if you don't use any for leds.
Soarer has convieniently provided the non-arduino labels the Pro Micro in a single image. You can use those labels when configuring the controller.
http://deskthority.net/workshop-f7/teen ... ml#p144955

The blue pro micros from china work just like the red ones from SparkFun. I have one I tried with Soarer's controller and Hasu's TMK firmware.

User avatar
Hypersphere

15 Jul 2014, 00:29

@ShawnMeg: I would second Muirium's suggestion to go with a Hagstsrom. I started out that way myself, and the Hagstrom works just fine.

However, when you get resettled and if you would like to try using a Teensy and Soarer's converter, there are many ways to connect components either in an external box or inside the case of an XT. A handy way to connect the Teensy to a case-mounted USB connector is via a mini male USB to 5-pin header, which is available from pcpartsandcables.com:

http://www.pcpartsandcables.com/support ... cables.php

You might be able to get by with jumper connectors, but for the long haul, soldering is better.

User avatar
beltet

15 Jul 2014, 00:45

scottc wrote: Thanks for the reminder beltet, I've been meaning to finish mine and then do a tutorial! I uploaded it but never finished wiring it because of a crappy PS2 port. I'll do it with a DIN5 soon and let you know. :)
Thats awesome, will read it!
Igthorn wrote: For the converter you only need 4 pins. BCG shows the pinout for converter on pro micro.
http://deskthority.net/workshop-f7/teen ... ml#p124124


For the controller, you can use 18 pins if you don't use any for leds.
Soarer has convieniently provided the non-arduino labels the Pro Micro in a single image. You can use those labels when configuring the controller.
http://deskthority.net/workshop-f7/teen ... ml#p144955

The blue pro micros from china work just like the red ones from SparkFun. I have one I tried with Soarer's controller and Hasu's TMK firmware.
The converter I did know thats its only 4 pins, but didn't realise the pictures you reffered to was the pro micro. Thanks for pointing that out to me!
I haven't built my own keyboard yet, and looking for a good controller. Thanks for the info. 18 will be quite enough right? Or do you need some more on a full sized keyboard?

User avatar
Igthorn

15 Jul 2014, 00:54

You'll need more pins if you want to do a 104/5 full sized keyboard. 18 pins in a 9x9 matrix (which maximizes possible keys) can only do 81 keys.

User avatar
Muirium
µ

15 Jul 2014, 01:07

Even my 60% custom uses 20 pins (15x5) as it's hard to optimise the matrix when hand wiring diodes!

http://deskthority.net/group-buys-f50/l ... ml#p133887

User avatar
scottc

15 Jul 2014, 20:35

Does anybody know of a reason why a converter would report write errors (found using hid_listen) when plugged in? None of the keypresses are giving any responses.

Apparently my incompetence is the leading cause for write errors! Oops.

User avatar
scottc

15 Jul 2014, 21:01

Update: I can confirm 100% that the Pro Micro + Soarer make a beautiful couple.

Posting this from my Model F AT through a Pro Micro and Soarer mix. :)

However, I can't get my Cherry XT keyboard to work with it - do I need to do any extra steps to get XT working, or is the keyboard itself likely busted? I think this is a question for you, Muirium, since I know you use yours with an F XT.

Dodgy temporary wiring:
Spoiler:
Image
Full_Frontal_F-ery_xvid_[m0d3lf].avi
Spoiler:
Image

User avatar
Muirium
µ

15 Jul 2014, 21:20

Remember to unplug the USB when swapping keyboards. The converter needs reset between times, as it only checks once to see what protocol it should use. Hot plugging on the keyboard side is guaranteed to make flaky results. One reason why a power switch is coming to my Mk.II converter box.

User avatar
scottc

15 Jul 2014, 21:27

Thanks. Was your F XT recognised straight away?

For me, hid_listen does this for my F AT:
Spoiler:
Waiting for device:
Listening:
rAA wEE rEE wF2 rFA

remaining: FFFC


Keyboard ID: 0000
Code Set: 2
Mode: AT/PS2
And this for the XT Cherry:
Spoiler:
Waiting for device:..............
Listening:
wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT
R05
It recognises the keyboard at XT, but then... read error.
Soarer's Docs wrote: R05 timeout started receiving clock from the board, but didn't receive enough for a full code

User avatar
Muirium
µ

15 Jul 2014, 21:33

Yes, it was the very first i plugged in and worked from the get go.

XT protocol keyboards have a different "set". I think the converter says (via hid_listen) that they are all ID 00. The protocol is one-way (no lock lights). Try running hid_listen and keepi an eye on it when you plug in a board.

User avatar
scottc

15 Jul 2014, 21:36

Aha, I seem to have ninja-edited -- I'd already added the hid_listen results to my previous post before you hit "send"!

i'm hoping it's just a mixture of coincidence and my dodgy wiring, for now. But the AT works every time. I'm waiting to get my solder back, and then I'll wire it up properly and see where that leaves me.

User avatar
Muirium
µ

15 Jul 2014, 21:39

Hmm. Isn't XT code 01? (Or even 00. Have a peek in the docs…) Are you sure this Cherry XT is XT protocol? The same DIN 5 plug can be AT, of course.

User avatar
scottc

15 Jul 2014, 21:45

I was told by Tinnie that it was XT, but haven't read it anywhere officially - good point. The converter seems to recognise it as XT, but it could be wrong. I'm consistently getting the R05 error, so that might be it.

I just found this hidden at the end of the docs:
Soarer's docs wrote: Terminal keyboards often have DIP switches on the back panel, or alternatively a pin header on the PCB that you can fit jumpers to, which configure the keyboard's ID code. The ID is a 16-bit number, but commonly fewer than 16 switches/jumpers are fitted meaning it's not possible to select all of the bits. The default value with no jumpers fitted, or with all the DIP switches in the 'open' position, is BFBF.

If your terminal keyboard is not operating correctly, it might be because the wrong ID is set on the switches/jumpers. The first byte should not be AB.
I've tried opening the case before, and it was not very much fun...

User avatar
Muirium
µ

15 Jul 2014, 21:49

You can also force a scanset. I'm away from the computer just now, but search the docs for the force keyword. Could be this thing is mis reporting itself, and needs coerced.

User avatar
scottc

15 Jul 2014, 22:05

Thanks a lot for the tips! I tried that, and unfortunately it didn't seem to help.

I've opened it up and couldn't find the headers that Soarer mentioned, but the PCB seems a bit unclean. There's a strange, shiny texture over it. It's hard to explain. It might be the case that these "NIB" keyboards were IB, but not N - maybe they were submerged in water. :(

User avatar
Muirium
µ

15 Jul 2014, 22:15

I've no idea what's up then. Hopefully the man himself can summon something useful from his deep knowledge.

Soarer uses the Teensy's LED to indicate errors. Another feature I'm using in my next box, for Facetsesame, where it will be duplicated on an LED mounted on the exterior, alongside the lock lights.

User avatar
scottc

15 Jul 2014, 22:21

Hopefully. Maybe some time later I'll wire up a Teensy and see if that makes any difference.

User avatar
beltet

15 Jul 2014, 23:03

I have problems with hid_listen.exe
It only says my device is not connected. And I can't get the HID codes. Tried unplug and replug the keyboard several times while hid listen is listening. Do you have any tip?

EDIT:
I feel stupid... I have restarted the computer and now it works...

JBert

16 Jul 2014, 08:31

@scottc: Does your model F AT work fine with your jury-rigged converter (i.e. does the computer detect your key presses)?

R05 can also happen if you have some wires crossed or some bad contacts...

User avatar
scottc

16 Jul 2014, 14:09

The Model F works perfectly with it, keypresses and all. The Cherry XT (?) board is detected as XT but no keypresses are detected. Trying to force it to use set3 doesn't seem to help either.

I'll try to find my solder today, and see if wiring it up properly helps.

User avatar
Muirium
µ

16 Jul 2014, 14:25

I doubt it's a wiring error, as when I've had issues with that: everything breaks completely. I think you'd be better off getting this right in software first.

From Soarer's docs:
Keyboard protocols supported:

PC/XT (scan code set 1)
AT (scan code set 2)
PS/2 (MF2) (extended scan code set 2)
Terminal e.g. 3179/318x/319x (scan code set 3)
Maybe it is in fact XT, and for whatever reason the converter isn't seeing it right. Try forcing set 1. As both your keyboards are ID 00 (as any XT keyboard should be) you could try this:

Code: Select all

ifkeyboard 0000
    force set0
I'm not sure if this needs to be in a remap block or not, as I've never used ifkeyboard outside one (for fancy adaptive layouts in my external converter box). Hopefully hid_listen will report the correct set if you get it right. And the keyboard suddenly working would of course be even better!

User avatar
scottc

16 Jul 2014, 14:54

I've just been using

Code: Select all

force setX
as the only definition on my config file and that much has been working fine. I've tried forcing all of the four protocols (1, 2, 2ext and 3), but with no luck on any of them.

Now, when I force set1 for PC/XT -

Code: Select all

Waiting for new device:..
Listening:


remaining: 0000


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT
...and then radio silence. Hmph.

It might be the case that this Cherry clones of the IBM 122 doesn't speak XT, which is what Tinnie told me. Perhaps it's some other protocol entirely.

User avatar
Muirium
µ

16 Jul 2014, 15:11

Yeah, that's no good. If any one of the four connections (GND, VCC, DATA and CLOCK) isn't right, your IBM shouldn't work as well, and you shouldn't be seeing that handshake. Even if it is a failed one…

Image

How attached is this Cherry's controller? You might have found yourself a project for Soarer's Controller!

User avatar
scottc

16 Jul 2014, 15:18

I'll take a look soon! It's a tricky one, as the top 24 F-row keys are attached by a ribbon cable, if I remember correctly. I'd better take some pictures for the wiki, while I'm at it.

poeticEnnui

16 Jul 2014, 22:20

Hey Soarer,

Quick question: is it possible to have two keys held down and activated simultaneously? Such that holding down the "S" and "D" keys, for example, would produce "SDSDSDSDSDSDSDSDSDSDSDSDSDSDSDS" instead of "SDDDDDDDDDDDDDDDDDDDD" as it currently does?

Just a little inquiry from a Starcraft player is all. Any help would be appreciated!

I use a Model F/AT with a Teensy 2.0. :)

User avatar
Muirium
µ

16 Jul 2014, 22:29

I definitely would NOT want that as the standard behaviour! But good news: Soarer supports macros. Look into them!

MasterControl90

17 Jul 2014, 23:00

Hi and thank you Soarer for your fantastic work on this converter! I've successfully made operational an old IBM Terminal 122 from 1987 (that I had paid just 3€ and it is in fantastic conditions), using internal pins on the logic board.
Image
Now I've a little question for all of you guys: I've already tested all the keys using hid_listen but there are some unused keys, how I can easily map these keys? Thank you in advance :3

User avatar
Halvar

17 Jul 2014, 23:20

Take a look at the file halvar.sc in Soarer's zip file. It' the config file I use for my M-122. I've tried to comment it to make clear which keys have which name.

MasterControl90

17 Jul 2014, 23:53

Halvar wrote: Take a look at the file halvar.sc in Soarer's zip file. It' the config file I use for my M-122. I've tried to comment it to make clear which keys have which name.
Sorry, what kind of file is it? how i can open/use it? I'm a total newbie in these kind of things.

User avatar
Halvar

18 Jul 2014, 08:51

.sc files are configuration files for Soarer's converter and the means to remap keys, define macros and do other nifty stuff in the converter.

You basically write them in the text editor and use two little programs to compile and upload them to the converter. It's easier than it may sound right now. See Soarer's documentation.

Also, here is a short step-by-step guide post:
http://geekhack.org/index.php?topic=174 ... #msg708153

The config file in that post is outdated though (especially the key names that start with "FAKE_" ), use halver.sc or another file from Soarer's package as a bas for your own experiments instead.

Post Reply

Return to “Workshop”