Author Topic: [TMK] IBM Terminal Keyboard converter  (Read 48887 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
[TMK] IBM Terminal Keyboard converter
« on: Mon, 13 February 2012, 11:10:50 »
This won't be updated and supported actively anymore.
Use new coverter firmware for IBM PC(XT, PS/2 and Terminal) instead now, check link below. (2020-01-11)
https://geekhack.org/index.php?topic=103648.0




Yet Another converter for IBM Terminal Keyboard(PS/2 Scan Code Set 3)




Keyboard converter for IBM terminal keyboard
============================================                                                                                                                                                         
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PRJC Teensy.
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
 
Source code: https://github.com/tmk/tmk_keyboard/tree/master/converter/terminal_usb
Article: http://geekhack.org/showwiki.php?title=Island:27272
 
 
CONNECTION
----------
Keyboard    ATMega32U4
----------------------
Data:       PD0
Clock:      PD1
 
And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
 
 
BUILD
-----
$ git clone https://github.com/tmk/tmk_keyboard.git
$ cd converter/terminal_usb                                                                       
$ make                                                                                             
                                                                                                   
                                                                                                   
RESOURCE                                                                                           
--------                                                                                           
Soarer's Converter: http://geekhack.org/showwiki.php?title=Island:17458                           
102keys(1392595): http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M   
122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html                               
KbdBabel: http://www.kbdbabel.org/                                                                 
RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png                             
DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png                   
                                                         
                                                                                                   
EOF
« Last Edit: Thu, 02 July 2020, 04:00:05 by hasu »

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #1 on: Sat, 04 May 2013, 01:25:55 »
I updated code to support 122 keys terminal keyboard(6110345).

I got this beast due to favor of generous members. Thanks a lot, guys.

Offline Hak Foo

  • Posts: 1271
  • Make America Clicky Again!
Re: IBM Terminal Keyboard converter
« Reply #2 on: Sat, 04 May 2013, 01:58:03 »
If I may ask, what makes it different and/or better than the Soarer converter?
Overton130, Box Pale Blues.

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #3 on: Sat, 04 May 2013, 02:29:24 »
hmm, availability of source code? In theory, you can fix problem yourself and add anything you want without bothering Soarer. In fact  there is no reason for using mine if you are happy with Soarer's converter.

Offline SmallFry

  • ** Moderator Emeritus
  • Posts: 3887
  • Location: Wisconsin, USA
  • Leaving 6/15; returning 6/22 or so.
Re: IBM Terminal Keyboard converter
« Reply #4 on: Sat, 04 May 2013, 02:33:12 »
I think Hasu is just happy to get the F from HaaTa. Congrats on that Hasu! How did meeting HaaTa go?

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #5 on: Sat, 04 May 2013, 04:57:40 »
It was great. I'm a lucky guy because i met him at my first GH(or DT?) meetup!

Offline ikoma

  • Posts: 28
  • Location: Austin, Texas
Re: IBM Terminal Keyboard converter
« Reply #6 on: Sun, 05 May 2013, 02:10:02 »
Just picked up this exact keyboard for $15
Looking forward to converting it and getting it working.
QFR x2 | HHKB Pro2 | IBM Model M2 x2 | IBM Model M | Razer Blackwidow | NeXT Keyboard (Alps)

Offline wyatt8740

  • Posts: 77
  • Machine code enthusiast
Re: IBM Terminal Keyboard converter
« Reply #7 on: Sat, 27 December 2014, 19:26:55 »
I know this hasn't been posted on for a very long time, but I think this is probably the best place to put it... If not, sorry for the necromancing.

I just made this with my arduino leonardo and upon plugging in my keyboard I get... squat.
Is there any way to figure out what is happening? does this use an indicator LED?

I believe PD2 is the leonardo's RX pin and PD5 is its TX pin.


Part number is 1386303.
« Last Edit: Sat, 27 December 2014, 19:29:00 by wyatt8740 »
I don't usually collect things, but when I do, they're from the 70's, 80's, and 90's. My typing speed: 79 WPM
IBM Model M 1386303, 1987 / IBM Model M 1391401, 1993 / IBM Model M 59G7980, 1993 / Unicomp "Mini M" UT40E7A (modded), 2021 / Dell AT101W, 1994 (Black Alps) / Apple Extended Keyboard (Orange Alps), 1987 / Sun Type 5, unknown year (Rubber Dome)

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: IBM Terminal Keyboard converter
« Reply #8 on: Sat, 27 December 2014, 19:57:08 »
I know this hasn't been posted on for a very long time, but I think this is probably the best place to put it... If not, sorry for the necromancing.

I just made this with my arduino leonardo and upon plugging in my keyboard I get... squat.
Is there any way to figure out what is happening? does this use an indicator LED?

I believe PD2 is the leonardo's RX pin and PD5 is its TX pin.


Part number is 1386303.

I think its a difference with Hasu's teensy (atmel) pin names and the leonardo's arduino pin names. Based on the following:
http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448.html


Here's arduino's image:
http://arduino.cc/en/Hacking/PinMapping32u4

Hasu requires PD2 (data) and PD5 (clock)
On the ardiono pro micro PD2 is RX and PD5 controls one of the LEDs

I recommend reassigning clock to PD3 (TX) and reflashing.

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #9 on: Sat, 27 December 2014, 21:05:14 »
Those figrues are useful. Thanks.

And leonardo schematic: http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf

Hasu requires PD2 (data) and PD5 (clock)
On the ardiono pro micro PD2 is RX and PD5 controls one of the LEDs

I recommend reassigning clock to PD3 (TX) and reflashing.

Yes, PD5 is needed but unfortuantely leonardo and pro micro have no pinout and drive TXLED with the pin.

As dorkvader said, you better change pin configuration, you need to edit Makefile and config.h and
connect data line to PD2(RX) and clock line to PD3(TX).

Code: [Select]
diff --git a/converter/terminal_usb/Makefile b/converter/terminal_usb/Makefile
index 6154d86..77b8228 100644
--- a/converter/terminal_usb/Makefile
+++ b/converter/terminal_usb/Makefile
@@ -78,9 +78,9 @@ COMMAND_ENABLE = yes    # Commands for debug and configuration
 #      USART is recommended if it is available, others are for reference purpose.
 #      INT implementation will drop simultaneous key strokes.
 #
-PS2_USE_USART = yes    # uses hardware USART engine for PS/2 signal receive(recomened)
+#PS2_USE_USART = yes   # uses hardware USART engine for PS/2 signal receive(recomened)
 #PS2_USE_INT = yes     # uses external interrupt for falling edge of PS/2 clock pin
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
+PS2_USE_BUSYWAIT = yes # uses primitive reference code
 
 ifdef PS2_USE_USART
     SRC += protocol/ps2_usart.c
diff --git a/converter/terminal_usb/config.h b/converter/terminal_usb/config.h
index ea5ce62..2349740 100644
--- a/converter/terminal_usb/config.h
+++ b/converter/terminal_usb/config.h
@@ -127,12 +127,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define PS2_CLOCK_PORT  PORTD
 #define PS2_CLOCK_PIN   PIND
 #define PS2_CLOCK_DDR   DDRD
-#define PS2_CLOCK_BIT   1
+#define PS2_CLOCK_BIT   3
 
 #define PS2_DATA_PORT   PORTD
 #define PS2_DATA_PIN    PIND
 #define PS2_DATA_DDR    DDRD
-#define PS2_DATA_BIT    0
+#define PS2_DATA_BIT    2
 #endif
 
 #endif

Offline Mittles

  • Posts: 1
Re: IBM Terminal Keyboard converter
« Reply #10 on: Wed, 11 March 2015, 22:00:25 »
hasu, why does PS2_USE_USART have to be disabled for a pin change?

I've tried this suggestion, and changed my breadboard to match for my RJ45 122 key board, still with no response. dmesg does detect your converter however and all seems to be running fine on the controller, just messy pin configuration.

I'm trying to get a similar setup to wyatt8740 (PN 1394100) working with an arduino micro, which should have the same pinout as the leonardo. Any ways to test to make sure I've not made a wiring mistake? I did get Soarer's to work, but I'd prefer to use something I can hack away at later on. That patch in your last post no longer directly applies to master.
« Last Edit: Wed, 11 March 2015, 22:47:45 by Mittles »

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #11 on: Wed, 11 March 2015, 23:21:42 »
Yes, for the pin change, PS2_USART implement requires PD5(XCK1) but Leonardo has pinout for those pin. You can't use PS2_USART, have to use PS2_BUSYWAIT(or PS2_INT) instead.
PS2_BUSYWAIT works with any pin combination, it is useful in this case.

Post photos of your converter wiring so that I can check.

And use PJRC 'hid_listen' tool to see message on debug console.

Offline darky_mtp

  • Posts: 1
Re: IBM Terminal Keyboard converter
« Reply #12 on: Tue, 18 April 2017, 16:53:54 »
I've tried this suggestion, and changed my breadboard to match for my RJ45 122 key board, still with no response. dmesg does detect your converter however and all seems to be running fine on the controller, just messy pin configuration.
I had the same behaviour.
You have to short J1 pad.
It works !

Edit : It's doesn't work everytime, I have to unplug/plug many times to get the keyboad alive. Once it's working, it will stay alive as long as it's connected.
I have to use Soerer's firmware to get it working everytime.
« Last Edit: Wed, 19 April 2017, 13:01:17 by darky_mtp »

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #13 on: Sun, 10 March 2019, 08:47:51 »
Fixed pin configuration in the first post to suit to current source code.

Offline therealding

  • Posts: 4
  • Location: Dallas, TX
Re: IBM Terminal Keyboard converter
« Reply #14 on: Fri, 19 April 2019, 22:58:10 »
Hello, I've flashed the firmware and used the pin arrangements to an RJ45 breakout board, but my keyboard doesn't seem to respond. I set up the pins on the Arduino Micro just as you described in the RESOURCE and with PD0 and PD1 but the keyboard doesn't seem to be working despite this. The arduino is the same one I used to convert an IBM pingmaster 4704 which I also used your firmware for as well as the PD0 and PD1 pins but that keyboard was working perfectly after plugging in.

Any idea what to do?

Offline Wumbologist

  • Posts: 15
Re: IBM Terminal Keyboard converter
« Reply #15 on: Sun, 04 August 2019, 01:59:44 »
Hello, I've flashed the firmware and used the pin arrangements to an RJ45 breakout board, but my keyboard doesn't seem to respond. I set up the pins on the Arduino Micro just as you described in the RESOURCE and with PD0 and PD1 but the keyboard doesn't seem to be working despite this. The arduino is the same one I used to convert an IBM pingmaster 4704 which I also used your firmware for as well as the PD0 and PD1 pins but that keyboard was working perfectly after plugging in.

Any idea what to do?

You ever find a solution? In the exact same situation except my F112 has the DIN connector.

Offline sterlinghatton

  • Posts: 1
Re: IBM Terminal Keyboard converter
« Reply #16 on: Tue, 01 October 2019, 04:12:22 »
Quote
Quote from: write my essay on Fri, 19 April 2019, 22:58:10
Hello, I've flashed the firmware and used the pin arrangements to an RJ45 breakout board, but my keyboard doesn't seem to respond. I set up the pins on the Arduino Micro just as you described in the RESOURCE and with PD0 and PD1 but the keyboard doesn't seem to be working despite this. The arduino is the same one I used to convert an IBM pingmaster 4704 which I also used your firmware for as well as the PD0 and PD1 pins but that keyboard was working perfectly after plugging in.

Any idea what to do?

What about resetting the EEPROM? Also how did you find breakout boards for the micro usb?
« Last Edit: Tue, 01 October 2019, 04:14:48 by sterlinghatton »

Offline spidey3

  • Posts: 3
  • Location: New York
Re: IBM Terminal Keyboard converter
« Reply #17 on: Fri, 10 January 2020, 09:27:04 »
Can this firmware be loaded onto Soarer's converter? I already have a Soarer converter in hand, but I would like to switch to open-source firmware that I can extend...

Offline hasu

  • Thread Starter
  • Posts: 3482
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: IBM Terminal Keyboard converter
« Reply #18 on: Fri, 10 January 2020, 19:25:54 »
Yes it is but use new firmware from link below instead now.
https://geekhack.org/index.php?topic=103648.0

This won't be updated actively anymore.

Can this firmware be loaded onto Soarer's converter? I already have a Soarer converter in hand, but I would like to switch to open-source firmware that I can extend...