Author Topic: [GB] Filco tenkeyless custom ATmega32u4 controller - All gone, that's it folks.  (Read 187432 times)

0 Members and 1 Guest are viewing this topic.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
It sounds a lot like he has bouncy switches or there's radio interference.  In my car w/ a crappy power inverter my Filco with the replacement controller would spit random crap out.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
No problems with the stock controller though.  Or any other mechanical keyboards.  Only specifically with HID Liberation Device,  on 2 computers in different rooms.  So I don't think either of those possibilities apply.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Well, the stock controller has de-bounce stuff in it.  bp's has none and hasu's has a little.  My stock controller doesn't have an issue in the noisy car.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
I'll try it in another Filco in a few days.  That should be telling.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
If you have double-charcter errors on a few specific keys I'd say your problem is a switch defect.
But you said Filco stock controller works well with those switches, I suspect Filco and other brands use more conservative value for debouncing.

To fix the problem you can reseat spring and slider on those switches or replace with new siwtch.
Heavier spring will make the switch more bouncy, I suppose.

Or you can try software solution. Increase value of DEBOUNCE in config.h then compile it.
You need to do 'make clean' after you edit config.h. 15-20 is safe, I suppose.
The bigger value of DEBOUNCE means its scan rate gets slow and it may cause missing key stroke or transposing.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
oops, double posts.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Thanks, that's worth trying.    The other issue was additional characters that were not doubled.  It would like something like this:

Thtis is an nexeamplpe.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline bpiphany

  • Thread Starter
  • Posts: 1022
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Thanks, that's worth trying.    The other issue was additional characters that were not doubled.  It would like something like this:

Thtis is an nexeamplpe.

This looks like it could be a glitch read of a pressed switch on a scan. If t is still pressed when h is pressed in This and the t press glitches it will be seen as a new t press and replace h as the first key in the HID package. The AVR-keyboard firmware I flashed the HID Liberations Devices with doesn't handle this at all. My new simple_keyboard firmware should alleviate this problem.

Edit: Actually when I think more about it, the falling edge is where all debouncing is done on the Liberation device. So that probably isn't the correct story. Anyway more debouncing should hopefully solve the problem. More shielding is harder to apply, but not impossible..
« Last Edit: Tue, 16 July 2013, 10:28:25 by bpiphany »

Offline Kalmarauder

  • Posts: 21
  • Location: Hamilton, Ontario, Canada
I'm trying to install the bootloader driver but it doesn't show up in the Device Manager, or at least I can't find it if it's there. What should I do?

Offline Photoelectric

  • * Administrator
  • Posts: 6753
I'm trying to install the bootloader driver but it doesn't show up in the Device Manager, or at least I can't find it if it's there. What should I do?

See here.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline Kalmarauder

  • Posts: 21
  • Location: Hamilton, Ontario, Canada
That's what I'm trying to do but I can't determine which item in the Device Manager tree is the keyboard's bootloader. When I plug the keyboard in, like 7 new entries appear under Human Interface Devices. If I try to update any of them (I've tried all of them), directing it to the proper folder (... /Flip 3.4.7/usb), it says "Windows has determined the driver software for your device is up to date" and Flip still can't open the device.

Offline Photoelectric

  • * Administrator
  • Posts: 6753
That's what I'm trying to do but I can't determine which item in the Device Manager tree is the keyboard's bootloader. When I plug the keyboard in, like 7 new entries appear under Human Interface Devices. If I try to update any of them (I've tried all of them), directing it to the proper folder (... /Flip 3.4.7/usb), it says "Windows has determined the driver software for your device is up to date" and Flip still can't open the device.

Perhaps this then.  Press both shifts or use a magnet when looking at the Device Manager.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
It seems your keyboard works as keyboard :), keyboard firmware is likely running.

What did you do to start bootloader?
1. 'magnet' always should work.
2. 'both shifts down' should work if you have bpiphany's firmware.
3. 'both shfits and pause down' should work if you have tmk firmware.

Try magnet.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Kalmarauder

  • Posts: 21
  • Location: Hamilton, Ontario, Canada
Sweet, the magnet did it. Thanks. Now I just have to get used to this layout.

Offline Photoelectric

  • * Administrator
  • Posts: 6753
I'm trying the controller on another Filco now.  Sadly the same story.  Even the same letters...  T's and O's are still doubled every once in a while.  I'm starting to think it's something to do with the controller, as what's the likelihood of 2 different keyboards with different switches having the same keys produce the same debounce (or whatever the real cause is) issues?

I also increased the debounce time in the config.h to 15 and then to 20--did not help.

This is the firmware I've tried:
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hid_liber

(tried both makefiles and the US ANSI layout).
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline yeeeargh

  • Posts: 15
you could test it with bpiphany's firmware to localize the error: https://github.com/BathroomEpiphanies/simple_keyboard/

a) if you don't have problems with this one there might be a bug in hasu's firmware.
b) if the error still exists there might be a error with your controller
« Last Edit: Sat, 20 July 2013, 03:02:34 by yeeeargh »

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
EDIT: aaaah, I missed unit of delay and confused between ns and us :)   IGNORE THIS.


Photoelectric,
hmm, interesting. Then, it doesn't seem to be a debounce problem, likey a bug in my firmware.

After browsing source code, circuit and datasheets, I might found a clue/flaw related to this problem. 74HC238 which used in HID liberation requires around 50us 'propagaton dealy' while tmk firmware wait only for 5us. This is completely out of spec and likey causes a wrong output state. I guess other people also should had experience of this problem.

http://www.mouser.com/ds/2/405/cd74hct138-84279.pdf
http://www.nxp.com/documents/data_sheet/74HC_HCT238.pdf


Propagation delay of 74HC238 may vary depending on manufacturers, let's take 100us for safety purpose.
Can you try this patch? Just change value at line 231 of matrix.c.

Code: [Select]
diff --git a/keyboard/hid_liber/matrix.c b/keyboard/hid_liber/matrix.c
index adf6ac8..d1a7341 100644
--- a/keyboard/hid_liber/matrix.c
+++ b/keyboard/hid_liber/matrix.c
@@ -156,7 +156,7 @@ uint8_t matrix_scan(void)
 {
     for (uint8_t col = 0; col < MATRIX_COLS; col++) {  // 0-7
         pull_column(col);   // output hi on theline
-        _delay_us(5);       // without this wait it won't read stable value.
+        _delay_us(100);       // without this wait it won't read stable value.
         for (uint8_t row = 0; row < MATRIX_ROWS; row++) {  // 0-17
             bool prev_bit = matrix_debouncing[row] & (1<<col);
             bool curr_bit = *row_pin[row] & row_bit[row];


This may not be related, but just curious. what is your wpm? are you very fast typer?
« Last Edit: Sat, 20 July 2013, 07:05:33 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Will try Bpiphany's firmware.

My WPM is ~90.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Update: flashed Bpiphany's firmware, and it seems to be more robust at preventing the extra letter error.  They are still happening, but less noticeable.  The annoying thing is that it does not show up immediately but gets worse over time.  For example, I typed a few paragraphs in Notepad prior to making this post, and they were all clean.  Then I got all excited and started typing a positive reply here, and the extra "o"s started showing up again  And the more I type, the more they pop up.  Definitely a function of typing faster as well.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline Photoelectric

  • * Administrator
  • Posts: 6753
EDIT: aaaah, I missed unit of delay and confused between ns and us :)   IGNORE THIS.


Photoelectric,
hmm, interesting. Then, it doesn't seem to be a debounce problem, likey a bug in my firmware.

After browsing source code, circuit and datasheets, I might found a clue/flaw related to this problem. 74HC238 which used in HID liberation requires around 50us 'propagaton dealy' while tmk firmware wait only for 5us. This is completely out of spec and likey causes a wrong output state. I guess other people also should had experience of this problem.

http://www.mouser.com/ds/2/405/cd74hct138-84279.pdf
http://www.nxp.com/documents/data_sheet/74HC_HCT238.pdf


Propagation delay of 74HC238 may vary depending on manufacturers, let's take 100us for safety purpose.
Can you try this patch? Just change value at line 231 of matrix.c.

Code: [Select]
diff --git a/keyboard/hid_liber/matrix.c b/keyboard/hid_liber/matrix.c
index adf6ac8..d1a7341 100644
--- a/keyboard/hid_liber/matrix.c
+++ b/keyboard/hid_liber/matrix.c
@@ -156,7 +156,7 @@ uint8_t matrix_scan(void)
 {
     for (uint8_t col = 0; col < MATRIX_COLS; col++) {  // 0-7
         pull_column(col);   // output hi on theline
-        _delay_us(5);       // without this wait it won't read stable value.
+        _delay_us(100);       // without this wait it won't read stable value.
         for (uint8_t row = 0; row < MATRIX_ROWS; row++) {  // 0-17
             bool prev_bit = matrix_debouncing[row] & (1<<col);
             bool curr_bit = *row_pin[row] & row_bit[row];


This may not be related, but just curious. what is your wpm? are you very fast typer?

I've made this change in the matrix.c and also set the debounce value in the config file to "20"--seems good now.  No additional characters, and the keyboard responds as I expect it to.  Thank you very much for looking into it.  I hope this is the end of that issue (crossing my fingers that I've not jinxed myself by typing that!)

I don't think the debounce value mattered that much, but I left it at "20", as that's what I had it set to earlier.  Doesn't seem to affect anything I can notice.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline Photoelectric

  • * Administrator
  • Posts: 6753
In order to modify the layout, I just need to swap around designations in one of the keymap*.h configuration files, like the ANSI or the CUSTOM, right?  Because it doesn't seem to work so far.  For example, I've swapped PgUp and PgDn with Home / End in the keymap_ansi.h , and when I save, compile, and program... the layout does not change--still the standard ANSI.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
According to the makefile in git ansi is the default, otherwise you have to specify which custom map you want.  You say you modified keymap_ansi.h which is the right one by default.  What's your make command look like?
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
I've made a backup copy of the original keymap_ansi.h and modified the original.  My make command is as follows:

make -f Makefile.lufa ansi

It creates a new hex file--I see it.  Then I load the new hex, and... It's like I hadn't made any changes.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Well, other than posting the keymap to get a 2nd set of eyes I don't know what to suggest.  What you're doing is right, so what you get should be too.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Thank you.  Here's my modified keymap_ansi.h

Code: [Select]
// hid_liber ANSI

static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default ANSI
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Ins|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Hom|PgU|End|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|PgD|Ret|
 * |-----------------------------------------------------------| `-----------'
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |             
 * |-----------------------------------------------------------|     ,---.   
 * |Shft|iso|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |   
 * |-----------------------------------------------------------| ,-----------.
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
      ESC,   F1,   F2,   F3,   F4,   F5,   F6,   F7,   F8,   F9,  F10,  F11,  F12,       PSCR,  SLCK, INS, \
      GRV,    1,    2,    3,    4,    5,    6,    7,    8,    9,    0, MINS,  EQL, BSPC, HOME,  PGUP, END, \
      TAB,    Q,    W,    E,    R,    T,    Y,    U,    I,    O,    P, LBRC, RBRC, BSLS,  DEL,  PGDN, ENT, \
     CAPS,    A,    S,    D,    F,    G,    H,    J,    K,    L, SCLN, QUOT,        ENT,                   \
     LSFT, NUBS,    Z,    X,    C,    V,    B,    N,    M, COMM,  DOT, SLSH,       RSFT,         UP,       \
     LCTL, LGUI, LALT,              SPC,                         RALT, RGUI,  APP, RCTL, LEFT, DOWN, RGHT),

};

static const uint16_t PROGMEM fn_actions[] = {};

The only changes are to the Insert / Home / End / Page Up / Page Down / and all those keys.  Also made an additional Enter key in place of the old Page Down location, and got rid of Pause (replacing it with Insert).
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Ok, i'd put money down that your hex is right.... now for your flashing process.  When I was using it Flip was a wacky beast.  There is a specific order of operations to successfully load the hex file, otherwise it doesn't really do it.

Now I need to remember what it is (or find the docs I wrote).
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Thank you again for helping troubleshoot this!!  I've been working on it and trying to learn / improve my controller, figuring out if I can make the bugs go away and such. 

Here's my flashing process:

* compile the new hex file
* open Flip
* press both shifts (used to use the magnet, but my reed switch is borked now)
* wait for the sound that new device has been plugged in
* make sure ATmega32U4 is selected in the drop-down menu
* open USB connection
* click on the "Load HEX file" button
* select my latest hex file
* click on "Start Application"
* unplug the keyboard, replug, reboot the computer (flashing usually messes up my mouse and sometimes makes my keyboard stuck in typing in all caps, so I generally have to reboot)
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
> press both shifts
Note that this is the way to start bootloader on bp's firmware. Not tmk firmware.

You can start by pressing both shifts and pause key on tmk. Pressing 'b' and space key while plugin should also work if BootMagic option is enable.

But I recommend magnet if possible it should always work. Magnet FTW :)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
That order of ops on Flip sounds right, if I remember selecting the hex before selecting the chipset is the wrong way, I'm guessing Flip validates that the hex is write for the chipset selected, so chipset first would make sense there.

Also, seeing as how you are eliminating Pause from your map, either stick to the magnet or you need to change the bootloader command.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Hrm, I'll try adding Pause.  But I get the plugged in new hardware sound by pressing both Shifts, and the keyboard becomes unresponsive.  So I thought I was doing the right thing!

I'll keep the Pause on the map now!  Insert can go.
---
Just tried it: didn't work :(  I pressed Pause first then both Shifts, while still holding Pause.

Recompiled a new hex file with this:
Code: [Select]
// hid_liber ANSI

static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default ANSI
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Hom|PgU|End|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|PgD|Ret|
 * |-----------------------------------------------------------| `-----------'
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |             
 * |-----------------------------------------------------------|     ,---.   
 * |Shft|iso|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |   
 * |-----------------------------------------------------------| ,-----------.
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
      ESC,   F1,   F2,   F3,   F4,   F5,   F6,   F7,   F8,   F9,  F10,  F11,  F12,       PSCR,  SLCK, BRK, \
      GRV,    1,    2,    3,    4,    5,    6,    7,    8,    9,    0, MINS,  EQL, BSPC, HOME,  PGUP, END, \
      TAB,    Q,    W,    E,    R,    T,    Y,    U,    I,    O,    P, LBRC, RBRC, BSLS,  DEL,  PGDN, ENT, \
     CAPS,    A,    S,    D,    F,    G,    H,    J,    K,    L, SCLN, QUOT,        ENT,                   \
     LSFT, NUBS,    Z,    X,    C,    V,    B,    N,    M, COMM,  DOT, SLSH,       RSFT,         UP,       \
     LCTL, LGUI, LALT,              SPC,                         RALT, RGUI,  APP, RCTL, LEFT, DOWN, RGHT),

};

static const uint16_t PROGMEM fn_actions[] = {};

When I click on "Start Application" I get the "USB device is unplugged" sound in Windows, so I assume Flip programs something in and releases the keyboard.  But... still Page Up and Page Down are on their original locations, and it appears the keymap is unchanged from the original ANSI.  I now wonder if any other changes got implemented, such as increased debounce time and the bug fix.

P.S.: I can't use the magnet--reed switch is broken, as I mentioned earlier.
« Last Edit: Sun, 28 July 2013, 21:23:29 by Photoelectric »
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
I found Makefile.lufa has wrong value(512) for BOOTLOADER_SIZE. I must be 4096.
This will cause the failure of starting bootloader from firmware. I think you have firmware with the wrong value on your keyboard and it cannot kick up bootloader by press key method.

In this situation you need to reset controller by reed switch or shortcircuit method.
Fixing reed switch is better way, I think. But you can also open case and make short circuit both end of reed switch to reset controller.

Then, fix BOOTLOADER_SIZE value, compile and program it.


EDIT: OOPS. BOOTLOADER_SIZE is OK. I was confused with phantom Makefile.
So I think you can still jump into bootloader by Magic or Boot Magic keys. If not you should repair your reed switch.
« Last Edit: Mon, 29 July 2013, 02:35:01 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Photoelectric

  • * Administrator
  • Posts: 6753
So, to be clear, there are *2* different bootloader modes that can exist on the controller at the *same* time?  I can enter one or the other?  I used the same flashing process back when I used a magnet for the reed switch--I'm not seeing any differences in how the flashing process goes now.  And I started with tms software right away.

Moreover, there are symptoms of successful flashing, or else Flip really messes up my OS, because after every flash, I have to reboot Windows (or my mouse gets messed up, plus sometimes typing in all capitals, and some keys don't work).  I'm not trying to be difficult and avoid the reed switch, but I want to understand the underlying logic.

And lastly, is it relevant to have other keyboards unplugged while flashing the controller?  I realize they are different devices with other controllers, but since my mouse gets affected, and my other keyboard gets affected (the all capitals bug), perhaps leaving it plugged in complicates something.
« Last Edit: Mon, 29 July 2013, 11:18:19 by Photoelectric »
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline bpiphany

  • Thread Starter
  • Posts: 1022
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
The bootloader is a snippet of code residing in the last section of the program memory. You either get there by jumping to the correct memory address while running your own code. Simply put, you hand over the controls to the bootloader. In order for this to work, the code currently running on the chip needs to be correct enough to get to where it makes the jump.

Or you pull the reset pin low and have the HWB pin pulled low when you release the reset pin again. Then the chip itself starts running from where the bootloader starts. Doing this hardware reset is a lot more sure to happen the correct way than a software jump. As good as bomb proof.. (You nee dto set the chip fuses depending on bootloader size, but that is a completely different story.)

It is the same bootloader code that is run either way you start it.
« Last Edit: Mon, 29 July 2013, 11:50:46 by bpiphany »

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Okay, then your explanation contradicts Hasu's.  He says to get to the TMS bootloader, I have to press both shifts and Pause.  But you're saying the bootloader is the same, so no matter how I get to it, it's the same end result.  I know I get into the bootloader just fine, as evidenced by the sound of a new device plugged in, keyboard becoming unresponsive, Flip being able to open the USB connection, etc.  Something is missing in those explanations about TMS firmware vs. simple_keyboard firmware that's leaving me confused.  It seems like TMS firmware is not getting properly flashed for some reason, even though I started flashing it by using the magnet on the first night of using the controller.  In fact I ONLY flashed TMS firmware until someone mentioned simple_keyboard firmware, which I tried later.  My reed switch was broken after I already flashed TMS firmware a bunch of times.

P.S.: I've just used a bent pin to reset to bootloader a few times, loaded the hex file from Makefile.lufa and then later a hex file from Makefile.pjrc (both from the tmk package), and the result is the same--I can still enter the bootloader by pressing both shifts.  So something is not right about having to press both shifts and Pause in my case. 
« Last Edit: Mon, 29 July 2013, 13:05:02 by Photoelectric »
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline bpiphany

  • Thread Starter
  • Posts: 1022
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
If you can still reset the chip with only both shifts it sounds like you haven't been able to flash anything onto it. I don't know if FLIP does it without asking but in general you need to do an erase of the chip before flashing anything new onto it.

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Looks like "erase" is auto-selected in Flip, but I haven't run that side of the window (by selecting "Run").  I normally just load the HEX file and click on "Start Application".  Do I need to run the left side first?

- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Umm... start application just reboots the controller (with that option checked) or starts the already present code on it.  It does not flash anything.  You need to hit Run in the left box.
« Last Edit: Mon, 29 July 2013, 13:58:07 by alaricljs »
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Photoelectric

  • * Administrator
  • Posts: 6753
*facepalm*  I knew I must have been doing something stupid...    Thanks to everyone, and sorry for wasting your time!  Hopefully it will work properly now.
----
Successfully flashed, finally!  Bootloader now comes up with two shifts + pause.  Trying debounce value of 10 and stock ANSI.  Thanks everyone once again.
« Last Edit: Mon, 29 July 2013, 14:08:32 by Photoelectric »
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline jedcred

  • Posts: 13
Unfortunately my post count isn't high enough to post in the classified for this but I thought it might help to ask here.  Does anyone happen to have an extra controller they got in the GB that they'd be willing to part with?
Keyboards:
Filco tenkeyless with Cherry Blues
IBM Model M \'93
Razer Blackwidow x 2 (because parts)
Goldtouch Adjustable
Logitech MX 5500

Offline gnubag

  • Posts: 508
  • Location: California, US
Unfortunately my post count isn't high enough to post in the classified for this but I thought it might help to ask here.  Does anyone happen to have an extra controller they got in the GB that they'd be willing to part with?

how nice of you to circumvent the rules.
probably not, maybe.

Offline csimi

  • Posts: 50
  • Location: Budapest, Hungary
Why don't you use DFU instead of Flip though?
Java is a major security risk.

Offline bpiphany

  • Thread Starter
  • Posts: 1022
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Why don't you use DFU instead of Flip though?
Java is a major security risk.
Isn't that just paranoid? Java as a web plugin, yes perhaps. Java as a runtime environment locally, not so much..

Offline cgbuen

  • Posts: 318
  • Location: SF Bay Area, USA
Another weird thing happened here at work today with it.. [my first original strange issue here and here]

With my Windows machine off, I unplugged my Filco, shifted my workspace around, and then I plugged it back into a different port and turned the machine back on. It seems to have swapped a few keys with each other (LCtrl became Caps Lock and vice versa, and LWin became LAlt and vice versa). Which became incredibly annoying, because I programmed Caps Lock to LCtrl and kept LCtrl as is, but now they're both Caps Lock. I then plugged it into a Mac and these swaps still seem to be there.

Is this further confirmation that I have hardware issues, or is this something that might be fixed by taking it back home and re-flashing with hasu's firmware (which might have been updated in the past month)?

Offline gnubag

  • Posts: 508
  • Location: California, US
Another weird thing happened here at work today with it.. [my first original strange issue here and here]

With my Windows machine off, I unplugged my Filco, shifted my workspace around, and then I plugged it back into a different port and turned the machine back on. It seems to have swapped a few keys with each other (LCtrl became Caps Lock and vice versa, and LWin became LAlt and vice versa). Which became incredibly annoying, because I programmed Caps Lock to LCtrl and kept LCtrl as is, but now they're both Caps Lock. I then plugged it into a Mac and these swaps still seem to be there.

Is this further confirmation that I have hardware issues, or is this something that might be fixed by taking it back home and re-flashing with hasu's firmware (which might have been updated in the past month)?

I had this problem with both my filco hid and my phantom, since some windows update. ctrl and caps were switched. I just fixed it in the keymapping and reflashed them.

Offline hasu

  • Posts: 2926
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Read this. Plugin with pressing backspace(and space if you use latest firmware) to clear setting.
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Photoelectric

  • * Administrator
  • Posts: 6753
Has anyone had a conflict with their HID Liberation Device keyboard being plugged in at the same time as a TRiK keyboard?  For some reason, if I plug in the TRiK keyboard, both boards stop working.  Plugging them in individually, keystrokes are registered.  Plugging both in, I get that bug where no input is possible, and the mouse click is messed up.  Have to reboot to be able to use either keyboard individually again.

(Although, my TRiK keyboard is not behaving properly at the moment either, as I took out all the switch tops and stems, and when completing just the `~ and 1! switches to test, I'm getting no input when pressing `~ and getting upside down !'s when pressing 1!.  Should check if the PCB is well insulated from the metal case, just in case.  But I think this is a different issue from the one above).

Okay, I think this was something related to not having all the switches in my TRiK keyboard.  Put all the switches in, and now everything works.  Odd!  I've been able to only have a couple of switches in at a time in my Filcos, and they registered properly.  Anyway, not an issue anymore!
« Last Edit: Tue, 22 October 2013, 13:18:34 by Photoelectric »
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -