Page 1 of 1

Building a 3270 M122 with QMK

Posted: 01 Jun 2021, 18:31
by jmaynard
Starting a separate thread here, since I'm finally getting to sink my teeth into the project.

I'm looking to build up two 3270-layout M122s, one for my desk and one for a project. The second will have a Raspberry Pi built in, as well, and will be basically a complete computer in a keyboard - running mainframe software via the Hercules emulator. As part of this, I'm going to be building up a couple of M122s with QMK. The idea is that they'll act like a regular PC keyboard (though true to the key labeling, which varies a bit from the usual PC layout) normally, but when a TN3270 program like x3270 gains control, it'll automatically switch into as faithful an emulation of a real 3270 keyboard as I can get, via a layer switch in QMK.

I'd originally planned to use a Teensy++ 2.0 for the keyboard controller, and have one built up and programmed and running. The impending demise of the 8-bit AVR controllers has me rethinking that plan. I've got a Teensy 3.5, but it's not directly supported by QMK. I'm starting to look at some of the alternatives, and rapidly running into a bewilderment of riches. What's the current thinking on controller hardware? I'm not looking to do a complete custom PCB, but rather a carrier board that a rebuilt controller like the Teensy or the BlackPill can be soldered to. I need 28 digital I/O lines, minimum, and that's without LEDs or sound or anything else.

Also, anyone have a complete set of 3270 keycaps? I've got one M122 with a 5250 data entry layout, and can repurpose that one if I can get a good set of keycaps for it.

Re: Building a 3270 M122 with QMK

Posted: 01 Jun 2021, 20:16
by jmaynard
Just ordered 10 BlackPills, whee...since it's natively supported and widely used in the QMK community, according to their Discord.

Re: Building a 3270 M122 with QMK

Posted: 02 Jun 2021, 01:26
by jsheradin
QMK should be able to interface with the stock controller board just fine as a converter. If you're really wanting to do direct matrix connection I'd recommend just harvesting the FPC connectors from the controller board kinda like this.
Spoiler:
IMG_20201027_184432.jpg
IMG_20201027_184432.jpg (1.05 MiB) Viewed 2016 times
There's a few projects floating around for USB replacement boards that could probably be flashed with whatever your custom firmware ends up being.

Re: Building a 3270 M122 with QMK

Posted: 02 Jun 2021, 02:05
by Sheepless
jsheradin wrote: 02 Jun 2021, 01:26 QMK should be able to interface with the stock controller board just fine as a converter. If you're really wanting to do direct matrix connection I'd recommend just harvesting the FPC connectors from the controller board kinda like this.
Spoiler:
IMG_20201027_184432.jpg
There's a few projects floating around for USB replacement boards that could probably be flashed with whatever your custom firmware ends up being.
Why harvest the connectors? Those Trio-Mate connectors are still available. When I built a test board for diagnosing matrix problems with an M122 recently, I used Mouser part numbers 571-7-520315-0 (20-way) and 571-5-520315-8 (8-way).

Re: Building a 3270 M122 with QMK

Posted: 02 Jun 2021, 02:21
by jsheradin
Sheepless wrote: 02 Jun 2021, 02:05 Why harvest the connectors? Those Trio-Mate connectors are still available. When I built a test board for diagnosing matrix problems with an M122 recently, I used Mouser part numbers 571-7-520315-0 (20-way) and 571-5-520315-8 (8-way).
The new Mouser parts are actually what's shown in my picture, one of them is just trimmed short. I just figured if the controller board is getting replaced anyways then the connectors might as well be put to use and keep cost down a bit in the process.

I guess if the controllers are going to be used for repairing a different board or something then sure, keep them in one piece.

Re: Building a 3270 M122 with QMK

Posted: 02 Jun 2021, 03:57
by jmaynard
I bought 10 each of the connectors from Mouser. (After fighting and losing to Digi-Key's online ordering system...) And I'm replacing the controller to get the power draw down, as well as save room in the case for the Raspberry Pi.