Capacitive F50, F62, F77 and F107 can be converted with this method.
This post took me some work, but after all I did it!.
First, I have to thank to HASU: https://geekhack.org/index.php?action=profile;u=3412 the creator of the firmware that allows one to convert any 4704 keyboard to usb.
Second, Why do you want to do this?
Short answer: Why not?
Large answer: I want to convert this awesome board to USB without loosing the original cable and the amazing original logic board that has an Intel 8048 Microcontroller from 1977
Third, let's start the tutorial!
What do you need?
- Arduino Pro Micro 5V 16Mhz
- A welder and some soldering skills
- DB-9 female RS232
- PC with Linux (You could use a virtual machine, I used Kali Linux with VirtualBox in WIN10)
Before we start, here is my F77 layout:
When you press the L1 key (and you keep it pressed) you have access to the layout level 1 and you can use the F keys, ESC and some others keys.
Here the download link of my firmware: https://drive.google.com/open?id=1VCUKv ... G8_gO2JhaN
To upload the code to the arduino go to step 8
- Download the main tmk keyboard master file from here:
https://drive.google.com/open?id=1ZtyH- ... MaznSZK0k_
Or you can clone the original repo:
- Unzip the folder and go to /converter/ibm4704_usb/ directory.
- Make a copy of the file "keymap_plain.c" and rename it with "keymap_YOURNAME.c", in YOURNAME put the name you want.
- Open the new file, and you'll see a keymap with 2 levels. Edit the keys with the keycodes you want. Here you can see all the keycodes available: https://github.com/tmk/tmk_keyboard/wiki/Keycode
But... there's a major problem. I don't know if Hasu knows this, but the key assignation is wrong. In the case of the F77, the extended 15 key pad is wrong assigned. In order to assign correctly the keys in the extended pad, you have to apply this configuration:
(The image is from the TMK editor and is just for illustration, it's better to show you an image of a keyboard than a C code struct )
As you can see, if you want to achieve MY keymap config, you should assign some keys on the leftmost 10 keys pad and some other keys on the 15 extended key pad.
- OPTIONAL STEP: If you are lucky and you keyboard has this buzzer:
You could make it work so It'll beep in every key press. Also you could move the knob to adjust the intensity of the beep (completely incredible). So, to make the buzzer works, you have to replace the file "matrix.c" from your original folder with this one:
https://drive.google.com/open?id=1ixLXJ ... QHNU3RQOx3
The diference from the original matrix.c and my matrix.c is that my file has a call to a function that sends to the logic board the command to make the buzzer beep.
- Open the Linux Terminal and navigate to the directory where you are working, in /converter/ibm4704_usb/
Now, type this command to install the required programs to generate and compile the firmware and to flash the arduino.
Code: Select all
sudo apt-get install binutils gcc-avr avr-libc uisp avrdude flex byacc bison
- Now, execute this command to generate and compile the firmware:
Where YOURNAME is the name you assigned to your keymap previously. That command will generate a ".hex" file with the name "ibm4704_usb_rev1.hex", you can rename it with the name you want, just keep the .hex extension.
Code: Select all
make -f Makefile.rev1 KEYMAP=YOURNAME
Alright, we have the firmware compiled and ready to run in the AVR architecture of our ATmega 32u4
- This step should be done very quickly, you have to start the arduino in Bootloader mode in order to load the firmware in the flash memory of the arduino. You can pick a male-male cable (like the ones used in the protoboards) and you have to connect the RST (RESET) pin to GND pin 2 times. Put one side of the cable in the RST pin and then touch 2 times the GND pin. This will make the arduino run the Bootloader sequence for 8 seconds. During this lapse of time you have to do 2 important things:
But before do that, keep in mind that you could start the bootloader of the Arduino the times you need or you want. So, don't get frustrated if your first 8 seconds passed away.
a) Open your ArduinoIDE or list the connected devices to the computer and you have to get the PORT where the Arduino Pro Micro is connected.
b) Once you know where the Arduino is connected, navigate again to the folder where you were working and execute this command to upload the firmare to the Arduino:
Where PORT is the port that you got in the a) step, and YOURFIRMWARENAME is the name you assigned to the .hex firmware created before.
Code: Select all
avrdude -p atmega32u4 -P PORT -c avr109 -U flash:w:YOURFIRMWARENAME.hex
- Create the External Adapter:
Ok, now you have to solder 4 cables to the Arduino Pro Micro and then to the DB9 female. Here's the Pinout:
- If you are a perfectionist like me, buy some heat-shrink tubes (tubos termocontraibles en Español) of diferent sizes. The smaller to the cables that go from the Arduino to the DB9 female and a bigger to cover all of the Arduino.
And the final result:
More images, files and a Spanish Tutorial can be found here:
Code: Select all