Author Topic: TMK firmware help.  (Read 3857 times)

0 Members and 1 Guest are viewing this topic.

Offline cactusplants

  • Thread Starter
  • Posts: 13
TMK firmware help.
« on: Fri, 08 July 2016, 08:49:34 »
Hello. I've been asking around and I can't seem to find any way to solve my issues.

I've built a hand wired board and I'm using TMK w/ a teeny 2.0. My macbook will recognise the keyboard and will function. The spacebar and the capslock keys wont function and my "#" when pressed writes "\".  When I connect the board to my windows 8.1 desktop, the keyboard does not type. It will only type "á".

Here are some photos and links to the pastebin containing my files for the KB.

Here are some photos of the underside and topside...

http://imgur.com/a/Ulcbh

And the code...

Keymap_poker.c
http://pastebin.com/T4kLEcM4

Keymap_common.h
http://pastebin.com/dfBZZMjW

matrix.c
http://pastebin.com/P7Z0dmc4

I'd really appriciate some help as I really want to get and use the glorious cherry switches. This rubber dome is killing me.

Offline vextanys

  • Posts: 40
Re: TMK firmware help.
« Reply #1 on: Fri, 08 July 2016, 10:17:13 »
Couple of things I can see:
* Your keymap definition does not match the #define - the number of keys in each rows needs checking
* K4C. has a dot, not comma in the #define
* Your read_cols is ordered a bit funny (not really a functional problem, just my OCD)
* The #define uses k46 (lowercase K) for space, and KC_##46 (missing K)
* I cant see a caps lock - where it is usually is mapped to Left Ctrl

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #2 on: Fri, 08 July 2016, 11:33:01 »
Couple of things I can see:
* Your keymap definition does not match the #define - the number of keys in each rows needs checking
* K4C. has a dot, not comma in the #define
* Your read_cols is ordered a bit funny (not really a functional problem, just my OCD)
* The #define uses k46 (lowercase K) for space, and KC_##46 (missing K)
* I cant see a caps lock - where it is usually is mapped to Left Ctrl

Sorry for the noob mistakes. I'm not a avid coder to be honest.

That solved most of the problems, but It still does refuse to work on the windows PC. I can type more or less freely. I forgot to re-flash the teensy with the correction of the caps though. But the caps key just creates havock. Half of the keys cease to function.

But in all honesty, working on the windows desktop is my main requirement, I just have no clue as to why it works.

Offline QuincyJones

  • Posts: 270
  • Location: The Greatest Of Them All, England
Re: TMK firmware help.
« Reply #3 on: Fri, 08 July 2016, 13:37:42 »
I thought diodes weren't neccessary unless you had LED's?
SENT FROM MY TRKA-100-ULTRA-PRO-1R WITH FLASHY MULTI-COLOURED LEDS FOR MEGA ULTRA COOLNESS
(please like me)

       

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #4 on: Fri, 08 July 2016, 22:36:28 »
I thought diodes weren't neccessary unless you had LED's?

Nope. The LED's do use a diode but a different one. The ones used for the switches allow for the controller to determine which row/colum the switches are on. Otherwise it would have no idea as to what switch is being pressed.

Offline a-c

  • Posts: 196
  • Location: USA
Re: TMK firmware help.
« Reply #5 on: Fri, 08 July 2016, 23:14:30 »
Are you including led.c in your make file? led.c in the gh60 folder assigns a caps lock status LED to B2, which is in your matrix.

Offline Aran.E99

  • Posts: 181
  • Location: United kingdom
Re: TMK firmware help.
« Reply #6 on: Sat, 09 July 2016, 06:41:42 »
the # problem is most likely the language you have on your pc. if you change it between english USA and english UK you will notice some keys are located other places.
SMK 2nd Gen Blue Alps mount <3

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #7 on: Sat, 09 July 2016, 10:00:09 »
the # problem is most likely the language you have on your pc. if you change it between english USA and english UK you will notice some keys are located other places.

I tried that, and it did not help. The keyboard continued to write "wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww" when no keys were pressed, I then plugged into the macbook and it works fine.

Offline Aran.E99

  • Posts: 181
  • Location: United kingdom
Re: TMK firmware help.
« Reply #8 on: Sat, 09 July 2016, 10:04:35 »
oh, maybe you compiled it on your macbook with mac compiler software which would make your keyboard not work on windows?

-Aran
SMK 2nd Gen Blue Alps mount <3

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: TMK firmware help.
« Reply #9 on: Sat, 09 July 2016, 10:10:21 »
It won't matter where it compiles as the output has to be the same or the program won't run on the Teensy.  The codes sent by the keyboard are the same regardless of what OS is on the other end - I can't think of any way for it to behave differently on Mac vs Windows.

Have you ran Switch Hitter to see what key(s) Windows thinks are pressed?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #10 on: Sat, 09 July 2016, 10:54:28 »
It won't matter where it compiles as the output has to be the same or the program won't run on the Teensy.  The codes sent by the keyboard are the same regardless of what OS is on the other end - I can't think of any way for it to behave differently on Mac vs Windows.

Have you ran Switch Hitter to see what key(s) Windows thinks are pressed?

Well, what has happened...

I ran switch hitter, and here is the log

49:44.0847 2 (0x32, BIOS 0x03) DOWN
49:44.0877 W (0x57, BIOS 0x11) DOWN
49:44.0894 S (0x53, BIOS 0x1F) DOWN
49:44.0902 Z (0x5A, BIOS 0x2C) DOWN

The rest of the keys work apart from the tab key and my right menu key. Again, plugged into the mac and it still works fine. I can't see any shorts and the connections seem sound.
« Last Edit: Sat, 09 July 2016, 10:56:13 by cactusplants »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: TMK firmware help.
« Reply #11 on: Sat, 09 July 2016, 11:13:02 »
That output looks like you've got a short causing the whole column to be pressed, but that should happen on both machines...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #12 on: Sat, 09 July 2016, 11:37:22 »
That output looks like you've got a short causing the whole column to be pressed, but that should happen on both machines...

Thats the reason I was ruling out a short. I've not got a Multi m handy, but I can't see any wires touching one another. When I had the board plugged in I was touching it with my finger, and when I touched the column 2 it would have an effect. I'll swap out the switch and diode as the switches are salvaged and there might be a bit of an issue with that. I'll report back one I get home from work as I've got to dash.

Offline a-c

  • Posts: 196
  • Location: USA
Re: TMK firmware help.
« Reply #13 on: Sat, 09 July 2016, 11:40:35 »
Are you including led.c in your make file? led.c in the gh60 folder assigns a caps lock status LED to B2, which is in your matrix.

Is the problem column connected to B2?

Offline Aran.E99

  • Posts: 181
  • Location: United kingdom
Re: TMK firmware help.
« Reply #14 on: Sat, 09 July 2016, 12:44:03 »
yeah, make sure your teensy pins correspond with the numbers on your code. like when i made my ADB converter for my first teensy project, i had the pin soldered in the wrong pin without changing the code which resulted in my mouse cursor flying everywhere. check for solder bridges etc.
SMK 2nd Gen Blue Alps mount <3

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #15 on: Sat, 09 July 2016, 20:22:47 »
Are you including led.c in your make file? led.c in the gh60 folder assigns a caps lock status LED to B2, which is in your matrix.

Is the problem column connected to B2?

Yes, it was. I skipped the LED stuff as I've no leds. I changed the code to output from a different pin and now im typing on this keyboard!

Still need to fix the stabiliser problem. As its hand  wired, my board plate only accepts PCB mounted stabs, so my spacing is killing me as it doesn't register half of the time. Also I am noticing a lot of double characters. Is that just a result in habit when coming from rubber domes to say, cherry mx browns?  Or is it a software issue?

you guys are the best!

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: TMK firmware help.
« Reply #16 on: Sun, 10 July 2016, 04:06:24 »
Glad to hear it works!

If you handwire you need plate mounted stabs, not PCB mount.  Or enablers :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #17 on: Sun, 10 July 2016, 13:52:05 »
Glad to hear it works!

If you handwire you need plate mounted stabs, not PCB mount.  Or enablers :)

It would have still been sitting there if it weren't for you guys.

I've got filco plate mounted and cherry plate mounted stabs, but the plate i bought on mass drop is pretty naff and the cutouts are too big to allow plate mount. The enabler looks amazing. I guess if I buy a few PCB mount stabs, I can use them with the enablers Correct?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: TMK firmware help.
« Reply #18 on: Sun, 10 July 2016, 13:58:26 »
Glad to hear it works!

If you handwire you need plate mounted stabs, not PCB mount.  Or enablers :)

It would have still been sitting there if it weren't for you guys.

I've got filco plate mounted and cherry plate mounted stabs, but the plate i bought on mass drop is pretty naff and the cutouts are too big to allow plate mount. The enabler looks amazing. I guess if I buy a few PCB mount stabs, I can use them with the enablers Correct?

Yup :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline cactusplants

  • Thread Starter
  • Posts: 13
Re: TMK firmware help.
« Reply #19 on: Sat, 23 July 2016, 10:18:56 »
Glad to hear it works!

If you handwire you need plate mounted stabs, not PCB mount.  Or enablers :)

It would have still been sitting there if it weren't for you guys.

I've got filco plate mounted and cherry plate mounted stabs, but the plate i bought on mass drop is pretty naff and the cutouts are too big to allow plate mount. The enabler looks amazing. I guess if I buy a few PCB mount stabs, I can use them with the enablers Correct?

Yup :)

That is great. I've got a silly armature question... What enablers do I buy? I've got a ISO enter key as well as a standard spacebar and a right standard shift that all wobble too much....

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: TMK firmware help.
« Reply #20 on: Sat, 23 July 2016, 11:21:32 »
I've got a silly armature question... What enablers do I buy? I've got a ISO enter key as well as a standard spacebar and a right standard shift that all wobble too much....

The number is how many standard keys wide the key you're stabilising is, but for smaller keys (not spacebars) if you look you'll see the spaces between the stab mounts are the same so they are all 2x.  A standard spacebar is either 6.25x or 7x which is why they are both available but from your pic yours is a 6.25 :thumb:
« Last Edit: Sat, 23 July 2016, 11:33:05 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod