New Controller for KishSaver and Other Model F

User avatar
hasu

09 Oct 2014, 04:46

Ellipse, nice job!
I got a bit talk about 107-key with REVENGE on IRC just a few days ago. This is a coincidence!? :o
I carefully read through the source code and 4704-specific and TMK general readme files for this github project but cannot figure it out. I read that there is a way to get the 4704 keyboard to list all its break codes by sending the FC "set key flag" command to the keyboard but do not know how to do so (I could not figure out how to use the console option either).
Feel free to ask me. And I'll be happy to improve the docs and my Engrish writing skill :D
See enable_break() in matrix.c, this function does the job.
And I can send you 4704 firmware dis-assembled list via PM for reference, if you want let me know.

The hid_listen message when plugging in the keyboard:
IBM 4704 Converter
Keyboard ID: A5
Enable break: x36 zc65:rFD c6B:rFD End

(Does FD in the row codes above indicate an error?)
FD means 'out of bound' or invalid scan code. You can ignore them, and I also had these on my KSaver IIRC.

my adjusted keymap_common.h file is below. I added some codes for 103 keys since I got an error when trying to add more than that. Pressing some keys outside of the main 62-key section result in Error: 78 or Error: 79 both with the unmodified compiled hex file and my adjusted one below.
In 50, 62 and 77-key keyboards 00-77h are valid scan codes and my converter supports those codes only. You need to fix to support scan codes beyond 77h. I guess valid scan codes are 00-7ch but not sure, you will need to do trial and error.

These lines should be fixed.
https://github.com/tmk/tmk_keyboard/blo ... trix.c#L73
https://github.com/tmk/tmk_keyboard/blo ... rix.c#L119

User avatar
Halvar

09 Oct 2014, 17:40

Is the Teensy-3.1 based project still going on?

The Teensy 3.1 has all these TOUCH input pins that can supposedly be used to read capacitance, and I wonder if someone already looked into using these. Especially if they measure in the right range and if they are fast enough to scan a keyboard matrix. As far as I understand (and I had some trouble understanding the data sheet when skimming through it), they use some kind of frequency comparison method and from my superficial understanding it seemed like the pins are already multiplexed to use one single comparator.

REVENGE

09 Oct 2014, 20:40

hasu wrote: Ellipse, nice job!
I got a bit talk about 107-key with REVENGE on IRC just a few days ago. This is a coincidence!? :o
A nice coincidence indeed. 8-)

Is there an option for your converter to output the data coming from the 4704 controller in HID listen?

User avatar
hasu

10 Oct 2014, 02:54

REVENGE wrote:
hasu wrote: Ellipse, nice job!
I got a bit talk about 107-key with REVENGE on IRC just a few days ago. This is a coincidence!? :o
A nice coincidence indeed. 8-)

Is there an option for your converter to output the data coming from the 4704 controller in HID listen?
You can apply this patch to see scan codes from 4704.

Code: Select all

diff --git a/converter/ibm4704_usb/matrix.c b/converter/ibm4704_usb/matrix.c
index 0bfda2b..aa54ac0 100644
--- a/converter/ibm4704_usb/matrix.c
+++ b/converter/ibm4704_usb/matrix.c
@@ -118,12 +118,14 @@ uint8_t matrix_scan(void)
         return 0;
     } else if ((code&0x78)==0x78) {
         // 0xFF-F8 and 0x7F-78 is not scancode
-        xprintf("Error: %0X\n", code);
+        xprintf("Error: %02X\n", code);
         matrix_clear();
         return 0;
     } else if (code&0x80) {
+        dprintf("%02X\n", code);
         matrix_make(code);
     } else {
+        dprintf("%02X\n", code);
         matrix_break(code);
     }
     return 1;
Maybe we should move to TMK thread if we need to discuss TMK 4704 converter specific further.
http://deskthority.net/workshop-f7/tmk- ... ml#p188066

User avatar
HaaTa
Master Kiibohd Hunter

10 Oct 2014, 03:42

Halvar wrote:Is the Teensy-3.1 based project still going on?

The Teensy 3.1 has all these TOUCH input pins that can supposedly be used to read capacitance, and I wonder if someone already looked into using these. Especially if they measure in the right range and if they are fast enough to scan a keyboard matrix. As far as I understand (and I had some trouble understanding the data sheet when skimming through it), they use some kind of frequency comparison method and from my superficial understanding it seemed like the pins are already multiplexed to use one single comparator.
The touch sense hardware is a bit too slow to scan a keyboard with (according to dfj). I might use something like a teensy 3.1 to make an upgraded cap sense controller in the near future. I do have some ideas on how to better use the ADC hardware on the Freescale arm chips.

User avatar
Halvar

10 Oct 2014, 08:07

That's interesting, thanks! I figured someone had looked into that already. Looking forward to what you're coming up with!

Post Reply

Return to “Keyboards”