Wednesday, October 31, 2018

Converting the IBM4704 Model 6113442 with an Arduino Pro Micro atmeta32u4

HERE is the keyboard. It's only $35. Snatch one of these up before they are all gone! They are seriously one of the coolest keyboard that I have ever used. Pros: ultra-smoothness of Alps Green linear switches, with the new-old-stock IBM hardware, seeeeriously beefy keycaps, and cool characters hinting at its intended use and market back in the day. Honestly please go get this cool piece of history.

Cons: there is a reason it is called the "Pingmaster"... the damn chassis pings like crazy.

All firmware credit goes to hasu. The guy is a champ. I was way too lazy to figure/decode/reverse engineer the encoding coming out of this dude. I'm sure you are too. If you are even lazier, go buy a converter from him!

Anyways go download the TMK firmware. Then follow these instructions on installing the proper tools that we will use. This will also explain things for windows. Once this is done, cd into converter/ibm_4704 directory. Run make -f Makefile.unimap.alps.rev1   . This will run the makefile which tells the AVR toolchain to compile all the things, and generate a .hex binary to directly flash to the device. The great thing about the atmega32u4 is that it can be connected to directly over USB and already has installed the CATERIN programmer. So no finicky extra tools and things to fail (I'm looking at you atmel ICE and almost every firmware programmer/jtag thing i have ever used). OKAY enough ranting.

For unix systems write the command ls /dev/tty* to see all of the listed connected devices. Connect your arduino and find the one that has changed. This is now the serial port you are going to write to. (the one I just found was /dev/tty.usbmodem1421)

Then run :
avrdude -p atmega32u4 -P  <your serial port> -c avr109 -U flash:w:ibm4704_usb_rev1_alps_unimap.hex

HOWEVER: seconds before you send this line, ground the reset pin (RST) pin of board TWICE to put the thing into bootload mode. This can be tricky, but you got it; i believe in you.

Once this is done, it should be prime. Follow this hookup guide that I got from Hasu's readme:
\ N 2 3 4 5 /
 \ N N N N /
2   GND
3   VCC 5V
4   DATA
N   No connection/No pin.
Data goes to pin 2 (PD1) of the Pro Micro, and Clock line goes to pin 3 (PD0).
LMK if you have any questions.

ALSO the keymap is garbage. I shall work on it and add more on it in the future (i know because I wrote this whole thing using the keymap....)

Additional resources:
More on the avrdude command

No comments:

Post a Comment