Author Topic: [TMK] FC660C Alt Controller  (Read 74289 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
[TMK] FC660C Alt Controller
« on: Fri, 24 March 2017, 02:20:13 »
TMK Alt Controller for FC660C
Premade controlller is Still available here :D(2023-02-18)

https://geekhack.org/index.php?topic=90317.0




Goal
To get programmability by replacing controller of Leopold FC660C with my own version.

How to open case
You have to void warranty from manufacturer to do this mod, of course.
More
Step 1: Void your warranty with getting rid of sticker and unscrew.


Step 2:  Crack it open using tool like phone openner with care.


Step3: Done!



Analysis
Reverse engineering work on the keyboard had happened by some people in this thread for these few years.
https://geekhack.org/index.php?topic=54222.0

More
Pics of FC660C: https://imgur.com/a/UTR8Z
FCC docs: https://fccid.io/RPKFC

Controller board


Dimensions: 98.3mm x 35.0mm
Schematic: https://fccid.io/pdf.php?id=1888185

* CPU: Fujitsu/Cypress F2MC-16LX MB90F337 - http://www.huazhoucn.com/propic/ds90335-ds07-13735-2e.pdf
* 20-contacts connector: Hirose DF14A-20P-1.25H - http://www.mouser.com/ds/2/185/DF14_catalog-939195.pdf
* 10-contacts connector: JST SM10B-SRSS-TB - http://www.jst-mfg.com/product/pdf/eng/eSH.pdf


Switch board


Schematic: https://fccid.io/pdf.php?id=1888185
* 20-contacts connector: Hirose DF14A-20P-1.25H - http://www.mouser.com/ds/2/185/DF14_catalog-939195.pdf
* LV07A - http://www.ti.com/lit/ds/symlink/sn74lv07a.pdf
* LV138A -  http://www.ti.com/lit/ds/symlink/sn74lvc138a.pdf
* LV4051A - http://www.ti.com/lit/ds/symlink/sn74lv4051a.pdf
* AD5258: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf


Connector Pinouts

Quote

    |Switch  |Controller |
    |  board |     board |Description                           |Schematic 
    |--------|-----------|--------------------------------------|-----------
    | 1      |20         | FG                                   |FG
    | 2      |19         | GND                                  |GND
    | 3      |18         | GND                                  |GND
    | 4      |17         | 3.3V                                 |V33
    | 5      |16         | 5V                                   |Vcc
    | 6      |15         |*Z6-TP1684-4-HYS(o)                   |FBSTB     
    | 7      |14         |*Z6-TP1684-2-KEY(i)                   |OUT
    | 8      |13         |*Z2-AD5258-5-SCL(I2C)                 |SCL
    | 9      |12         |*Z2-AD5258-4-SDA(I2C)                 |SDA
    |10      |11         |*Z4-LV4051A-6-~EN(Col 0-7)            |INH_1     
    |11      |10         |*Z5-LV4051A-6-~EN(Col 8-F)            |INH_2     
    |12      | 9         |+Z7-LV07A-5 (LV4051A-9-C)             |SEL_C     
    |13      | 8         |+Z7-LV07A-1 (LV4051A-10-B)            |SEL_B     
    |14      | 7         |+Z7-LV07A-3 (LV4051A-11-A)            |SEL_A     
    |15      | 6         |+Z3-LVC138A-3-C                       |COL4
    |16      | 5         |+Z3-LVC138A-2-B                       |COL3
    |17      | 4         |+Z3-LVC138A-1-A                       |COL2
    |18      | 3         |+Z3-LVC138A-4-~G2A  Z6-TP1684-5-~EN   |COL1
    |19      | 2         |+Z7-LV07A-11-~InsertLED               |LED1
    |20      | 1         |+Z7-LV07A-13-~CapsLED                 |LED2

```
* 5V intferface
+ 3.3V interface
```



Digipot
You can communicate with AD5258 via I2C through 8 and 9 pins, though this is not needed for normal use of the keyboard.
You can tune actuation point by changing resistance of the digipot. But this may be in danger of making your keyboard unusable accidentally, firmware won't offer this feature at this point.

You can see test codes here, this works well for me somehow but try at your own risk.
https://github.com/tmk/tmk_keyboard/blob/fc660c_i2c/keyboard/fc660c/unimap_i2c.c

Fork fc660c_i2c branch and run 'make -f Makefile.i2c' in fc660c directory to build firmware.

// !!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!
// Writing improper value to EEPROM may mess your keyboard and
// it will require some hassles to recover it.
//
// CHECK DATASHEETS SCHEMATICS AND CODES BEFORE TRYING.
// !!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!



3.3V powered chips
LV07A(Z1, Z7) and LVC138A(Z3) work with 3.3V Vcc and receive 3.3V level inputs originally. But in fact they can work only with 5V supply by connecting 5V with 4pin instead of 3.3V.
I beleive giving 5V power with the chips doesn't harm those chips physically because it is within "Absolute Maximum Ratings". Moreover, 5V Vcc on LV07A meets "Recommended Operating Conditions"  completely and nothing wrong there. But note that 5V powered LVC138A is out of its "Recommended Operating Conditions" and it may affect reliability of operation slightly.

On the other hand, inputs of both chips are 5V tolerant, it is completely safe to interface using 5V I/O microcontroller even when the chips are powered with 3.3V. You don't have to use 3.3V I/O.

You can choose whether you use 3.3V voltage regulator or not depending your preference or precaution.



How to scan switches
This code emulates what original controller does on scanning.
https://github.com/tmk/tmk_keyboard/blob/472a60c40d32469197c168b8ec488e85c6efaa4f/keyboard/fc660c/fc660c.c#L66-L124

More

Logic analyzer pics of matrix scan
From these waveforms You will get idea about how to scan switches on the keyboard.

Close up:


Overall:




Switch matrix
Quote

    |    |0   |1   |2   |3   |4   |5   |6   |7   |8   |9   |A   |B   |C   |D   |E   |F   |
    |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
    |   0|Q   |W   |E   |Tab |R   |U   |T   |Y   |O   |P   |[   |I   |]   |    |\   |Del |
    |   1|1   |2   |3   |Esc |4   |7   |5   |6   |9   |0   |-   |8   |=   |    |BSpc|Ins |
    |   2|    |LWin|LAlt|LCtl|    |    |    |Spc |RAlt|    |RCtl|    |Fn  |Down|Left|Rght|
    |   3|    |Z   |X   |LSft|C   |N   |V   |B   |,   |.   |/   |M   |RSft|Up  |    |    |
    |   4|A   |S   |D   |Caps|F   |J   |G   |H   |L   |;   |'   |K   |    |    |Entr|    |
    |   5|    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
    |   6|    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
    |   7|    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
Row5-7 have no key, you can omit scaning on those lines. Topre original controller scans those rows for some reason.


Row designation
LV138A(Z3) selects a row line and gives strobe by enabling with ~G2A(18).

Quote

    |Row |A/17|B/16|C/15|
    |----|----|----|----|
    |0   |0   |0   |0   |
    |1   |1   |0   |0   |
    |2   |0   |1   |0   |
    |3   |1   |1   |0   |
    |4   |0   |0   |1   |
    |5   |1   |0   |1   |
    |6   |0   |1   |1   |
    |7   |1   |1   |1   |


Column designation
LV4051A(Z4, Z5) select one of 16 column lines to sense capacitance of switches.

Quote

    |Col |A/14|B/13|C/12|Z4-EN/10|Z5-EN/11|
    |----|----|----|----|--------|--------|
    |0   |0   |0   |0   |0       |1       |
    |1   |1   |0   |0   |0       |1       |
    |2   |0   |1   |0   |0       |1       |
    |3   |1   |1   |0   |0       |1       |
    |4   |0   |0   |1   |0       |1       |
    |5   |1   |0   |1   |0       |1       |
    |6   |0   |1   |1   |0       |1       |
    |7   |1   |1   |1   |0       |1       |
    |8   |0   |0   |0   |1       |0       |
    |9   |1   |0   |0   |1       |0       |
    |A   |0   |1   |0   |1       |0       |
    |B   |1   |1   |0   |1       |0       |
    |C   |0   |0   |1   |1       |0       |
    |D   |1   |0   |1   |1       |0       |
    |E   |0   |1   |1   |1       |0       |
    |F   |1   |1   |1   |1       |0       |




Make Alt controller
Now that you can get all of information to make your own controller for FC660C from here and there, post in this thread to share your findings and ideas.

Harness
To get connected to switch board you will need cable with Hirose DF14 series connector.
More
I made harness like this for prototyping on bread board but it was tedious and diffifult to crimp its contacts with wires.


Instead, I could use original cables with DF14 receptacle and solder wires on there, it would be far easier.


Or you can find cable on ebay. Search with "DF14 20P".


Connection
Basically you need just 15 5V I/O pins from your favorite microcontroller to connect them with DF14 connector. Easy.
More
I used very plain dev board with ATMega32U4 for bread board protyping. And this is photo and example of pin configuration for the microcontroller.



Prototype on bread board in action.


Quote

    |Switch  |                                          |           
    |  board |Description                               |ATmega32u4
    |--------|------------------------------------------|-----------
    | 1      | FG                                       |GND       
    | 2      | GND                                      |GND       
    | 3      | GND                                      |GND       
    | 4      | 3.3V                                     |3.3V/5V   
    | 5      | 5V                                       |5V         
    | 6      |*Z6-TP1684-4-HYS(o)                       |PC7       
    | 7      |*Z6-TP1684-2-KEY(i)                       |PC6       
    | 8      |*Z2-AD5258-5-SCL(I2C)                     |PD0(TWI)   
    | 9      |*Z2-AD5258-4-SDA(I2C)                     |PD1(TWI)   
    |10      |*Z4-LV4051A-6-~EN(Col 0-7)                |PB4       
    |11      |*Z5-LV4051A-6-~EN(Col 8-F)                |PB3       
    |12      |+Z7-LV07A-5 (LV4051A-9-C)                 |PB2
    |13      |+Z7-LV07A-1 (LV4051A-10-B)                |PB1
    |14      |+Z7-LV07A-3 (LV4051A-11-A)                |PB0
    |15      |+Z3-LVC138A-3-C                           |PD6
    |16      |+Z3-LVC138A-2-B                           |PD5
    |17      |+Z3-LVC138A-1-A                           |PD4
    |18      |+Z3-LVC138A-4-~G2A  Z6-TP1684-5-~EN       |PD7
    |19      |+Z7-LV07A-11-~InsertLED                   |PB5
    |20      |+Z7-LV07A-13-~CapsLED                     |PB6

This is circuit schematic of TMK Alt controller, for reference. * fc660c_controller.pdf (40.38 kB - downloaded 676 times.)


Firmware
TMK firmware supports FC660C Alt controller of ATMega32U4 now.

https://github.com/tmk/tmk_keyboard/tree/master/keyboard/fc660c

TMK Keymap Editor is available


Plain keymap:
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c

Emulation keymap: This emulates FC660C stock behaviour on Esc/~`, Fn+Esc and Fn+q.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c_emu


How to control LEDs
You can't change LED behaviour with Keymap Editor.

In 'Plain' keymap firmware Capslock LED indicates its key status and Insert one is not controlled at all.
In 'Emulation' keymap firmware Capslock LED indicates its key status and  Insert one is lit when Layer1 is enabled.

Capslock and Insert LED are connected to PB6 and PB5 respectively. You can control them as you want by writing small code. Refer to these files.
https://github.com/tmk/tmk_keyboard/blob/f8276ddb57c8b13931c3889a0b50711ea20c5d3d/keyboard/fc660c/unimap_emu.c#L57-L65
https://github.com/tmk/tmk_keyboard/blob/4befc879f68bf09421071f81138cd3665e625f28/keyboard/fc660c/fc660c.c#L129-L136






Note
- Actuation point adjustment See this post. https://geekhack.org/index.php?topic=88439.msg2403275#msg2403275
« Last Edit: Fri, 17 February 2023, 20:06:39 by hasu »

Offline hking0036

  • Posts: 343
  • Location: NC, USA
Re: FC660C Alt Controller
« Reply #1 on: Fri, 24 March 2017, 18:26:58 »
Cool stuff. Looking forward to more info as it comes.
Realforce RF87UB 45g Uniform | Leopold FC660C w/ TMK | IBM Model M - 3/24/1997 | IBM Model F 122 - 11/25/1985 ANSI'd w/ TMK | IBM Model F XT in a box

Offline nsmechkb

  • Posts: 179
  • Location: ON, CA
Re: FC660C Alt Controller
« Reply #2 on: Fri, 24 March 2017, 20:22:57 »
Amazing!

Lack of controller and aesthetics are the two main arguments against 660C vs HHKB imo.  Can't really help the layout--they chose it, and it's functional.  But you're solving the controller issue for us!  Thank you!

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: FC660C Alt Controller
« Reply #3 on: Sat, 25 March 2017, 11:19:38 »
Been following this from the start, awesome work hasu!  :thumb:

Count me in for one of the first ones that you sell, would love to see a bluetooth version w/ a built in switcher  :p
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #4 on: Sat, 25 March 2017, 19:47:15 »
Finished updating in first post and all infos needed for this mod should be there. :phew:


Been following this from the start, awesome work hasu!  :thumb:

Count me in for one of the first ones that you sell, would love to see a bluetooth version w/ a built in switcher  :p

I'm working on TMK USB Alt Controller for FC660C now. I'll post here for its update.


Bluetooth version may come months later but I'm not sure.


Offline Korseir

  • Posts: 91
Re: FC660C Alt Controller
« Reply #5 on: Sat, 25 March 2017, 21:11:17 »
Awww yiiiiis

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: FC660C Alt Controller
« Reply #6 on: Sun, 26 March 2017, 02:59:49 »
Count me in for USB (and later) BT!  :thumb:

A few people I've heard have had issues with the stock female mini USB coming off their stock board, will your controller use a more secure version of the connector?
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline JMD

  • Posts: 145
  • Location: Calgary Ab
  • All we want is happiness.
    • Mech Keys
Re: FC660C Alt Controller
« Reply #7 on: Sun, 26 March 2017, 03:11:38 »
Hi Hasu,

I have purchased a like new in box, fc980c.

The other day, plugging in the keyboard completely died and is unresponsive. No damages anywhere to be seen, just randomly quit working.

I am wondering if my controller for it failed. Do you know if this controller would work on my 980c?

- mechkeys - ca -

Offline Rykno

  • Posts: 102
  • Location: Where I want to be.
Re: FC660C Alt Controller
« Reply #8 on: Sun, 26 March 2017, 03:15:40 »
Would this work for FC660m?

Offline cutterline

  • Posts: 52
Re: FC660C Alt Controller
« Reply #9 on: Mon, 27 March 2017, 08:17:46 »
Would this work for FC660m?
No, C is a different beast.

Hi Hasu,

I have purchased a like new in box, fc980c.

The other day, plugging in the keyboard completely died and is unresponsive. No damages anywhere to be seen, just randomly quit working.

I am wondering if my controller for it failed. Do you know if this controller would work on my 980c?



No and why don't you go RMA that?

Offline ramnes

  • Posts: 864
  • Location: France
  • T fou, mec?
Re: FC660C Alt Controller
« Reply #10 on: Mon, 27 March 2017, 08:42:51 »
Looking forward for the PCB GB. Thanks Hasu for all your work, that's incredible.
23h18 - photekq: hhkb with silenced realforce sliders and lubricated well is
23h18 - photekq: the best switch i've used

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: FC660C Alt Controller
« Reply #11 on: Mon, 27 March 2017, 14:15:04 »
Definitely super interested in a kit or pre-built!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #12 on: Mon, 27 March 2017, 18:05:44 »
Hi Hasu,

I have purchased a like new in box, fc980c.

The other day, plugging in the keyboard completely died and is unresponsive. No damages anywhere to be seen, just randomly quit working.

I am wondering if my controller for it failed. Do you know if this controller would work on my 980c?



This controller doesn't work with FC980C.
It doesn't fit physically at least. FC980C has different controller but seems to be very similar to FC660C. I think you can use many of information and design in this thread to make repacement controller for FC980C.

This is pic of FC980C controller.

Thanks for the photo, testplsignore. https://geekhack.org/index.php?topic=54222.msg2384740#msg2384740

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #13 on: Mon, 27 March 2017, 18:12:43 »
Would this work for FC660m?

No. It is probably completely different.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #14 on: Mon, 27 March 2017, 18:44:18 »
Count me in for USB (and later) BT!  :thumb:

A few people I've heard have had issues with the stock female mini USB coming off their stock board, will your controller use a more secure version of the connector?

I'll use trusty Hirose USB mini receptacle, specifically UX60SC-MB-5S8 which is used on current version of Topre original controller(marked ZJ0121 on its PCB).
Its shell has through hole feet which people generally prefer to SMT. I also use this on my Alt controller for HHKB and no problem have been reported from users so far.
http://www.mouser.com/ds/2/185/UX_catalog-939708.pdf

From FCC documents initial versions of FC660C seems to use UX60SC-MB-5ST which has SMT feet not through hole. I speculate this cause the issues but not sure.
Not that SMT is problem it may be difficult to get good bond strength in comparison with TH. They will need exactly controlled soldering  process and good quality PCB.

Offline Latin00032

  • * Destiny Supporter
  • Posts: 1528
Re: FC660C Alt Controller
« Reply #15 on: Mon, 27 March 2017, 18:57:47 »
Sign me up for this!
Need a new controller. :)

Offline robotmaxtron

  • Posts: 107
  • Location: Austin,TX
Re: FC660C Alt Controller
« Reply #16 on: Wed, 29 March 2017, 21:31:06 »
this is great Hasu, I can't wait to pick one up.

Offline _rubik

  • * Esteemed Elder
  • Posts: 1089
  • Location: 192.168.x.x
  • Typing on: Brutal60, Lavenders Linears, GMK Jamon
Re: FC660C Alt Controller
« Reply #17 on: Mon, 03 April 2017, 12:27:00 »
This almost makes me regret buying my clueboard... I can't wait for updates on this project.
ai03 Meridian ¤ Mech 27 ¤ E8.5 ¤ Brutal60 ¤ SSK White Label ¤ HHKB Pro JP ¤ vAEK68 Alps Blues ¤ RF87u

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #18 on: Wed, 05 April 2017, 00:13:11 »
I got first revision of PCB the other day and have tested it for these two or three days. I have no big problem on it and am typing on it.

First PCB
In the revision screw holes and USB connector is a bit off but no problem in use and it will align completely by filing the hole a little.  No electrical issue is found.

USB connector(a bit off)


PCB.


Button on bottom.



Keymap Editor
And added oline keymap editor for FC660C controller. Default keymap is a bit complex to emulate original behaviour like Shift+Esc=~ and Fn+Q.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c
« Last Edit: Sun, 18 February 2018, 00:59:25 by hasu »

Offline BAS1C

  • Posts: 443
  • Location: Calgary, AB
Re: FC660C Alt Controller
« Reply #19 on: Wed, 05 April 2017, 00:14:45 »
I got first revision of PCB the other day and have tested it for these two or three days. I have no big problem on it and am typing on it.

First PCB
In the revision screw holes and USB connector is a bit off but no problem in use and it will align completely by filing the hole a little.  No electrical issue is found.

USB connector(a bit off)
Show Image


PCB.
Show Image


Button on bottom.
Show Image



Keymap Editor
And added oline keymap editor for FC660C controller. Default keymap is a bit complex to emulate original behaviour like Shift+Esc=~ and Fn+Q.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c
Show Image


Awesome news, it looks great! What is the ETA on finalized PCBs for purchase?

Offline robotmaxtron

  • Posts: 107
  • Location: Austin,TX
Re: FC660C Alt Controller
« Reply #20 on: Wed, 05 April 2017, 00:38:18 »
Excellent work Hasu, really looking forward to an eventual larger run of the pcbs.

Offline stoic-lemon

  • Posts: 970
  • Location: Saitama, Japan
Re: FC660C Alt Controller
« Reply #21 on: Wed, 05 April 2017, 00:49:27 »
I made a wish a few days ago that this would happen. Now i can finally buy one these keyboards. Thanks Hasu.

Offline suparnemo

  • Posts: 121
Re: FC660C Alt Controller
« Reply #22 on: Wed, 05 April 2017, 15:01:18 »
Hi Hasu,

For Shift + Esc = ~

Can't you do on layer 2 code edit for esc key:
Action_mods_key Rshift Grave?

Offline commandlinedesign

  • Posts: 11
  • Location: San Francisco
Re: FC660C Alt Controller
« Reply #23 on: Wed, 05 April 2017, 17:09:52 »
Hail Hasu!

This is incredible. I don't even own an fc660c, but I might get one now.

Offline lolbitter

  • Posts: 3
Re: FC660C Alt Controller
« Reply #24 on: Wed, 05 April 2017, 19:25:30 »
Holy crap so cool. Great job hasu! Looking forward to trying it whenever it's available.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #25 on: Wed, 05 April 2017, 19:27:47 »
Hi Hasu,

For Shift + Esc = ~

Can't you do on layer 2 code edit for esc key:
Action_mods_key Rshift Grave?

How do you change to layer 2 then?

I think ACTION_LAYER_MODS(2, SHIFT) on layer 0 is required to emulate Shift+Esc behaviour.

Offline TJ446

  • Posts: 1
  • Location: Pacific Northwest
Re: FC660C Alt Controller
« Reply #26 on: Wed, 05 April 2017, 19:46:03 »
Hi Hasu. Thanks for all of your awesome work. If you do sell a finalized controller, I'd be interested in buying 2...

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #27 on: Wed, 05 April 2017, 19:52:40 »
Awesome news, it looks great! What is the ETA on finalized PCBs for purchase?

GB thread will open soon.
It closes at end of April and shipping starts at mid of May in current schedule.

I'll be able to do a few more iteration of pcb designs before closing GB.

Offline Jumie

  • Posts: 298
  • Location: Dangerously Beautiful
Re: FC660C Alt Controller
« Reply #28 on: Wed, 05 April 2017, 20:08:37 »
How much will it cost? Count me in..

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #29 on: Wed, 05 April 2017, 20:51:39 »
How much will it cost? Count me in..

40USD shipped. GB thread was just approved. Please post any question and suggestion regarding GB in the thread.

https://geekhack.org/index.php?topic=88720.0


Offline mszy52

  • Posts: 48
Re: FC660C Alt Controller
« Reply #30 on: Wed, 05 April 2017, 21:12:19 »
Congrats on finally getting the controller to the public! Is there any estimation now of when the bluetooth controller will be finished?

Offline hiram

  • Posts: 8
Re: FC660C Alt Controller
« Reply #31 on: Wed, 05 April 2017, 23:54:46 »
Will there be a way to control the led under the Insert key?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #32 on: Thu, 06 April 2017, 03:59:56 »
Will there be a way to control the led under the Insert key?

Yes, you can control the LED by writing small code.

In current firmware the Insert LED is lit when layer 1 is activated to emulate Fn+Q behaviour.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/fc660c/unimap.c#L57-L65

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #33 on: Thu, 06 April 2017, 06:51:15 »
Congrats on finally getting the controller to the public! Is there any estimation now of when the bluetooth controller will be finished?

I have no clear plan on Bluetooth controller, I'm not working on it currently at least.

I found some dificulties on Bluetooth controller. One of them is that FC660C controller PCB is much smaller than HHKB and this requires new design and components. It will take longer than what I expected and I'm not sure when I can have enough time to do so.

Offline thelaughingman

  • Posts: 246
  • Location: Vietnam
  • Simultaneously the most starry-eyed idealist and t
Re: FC660C Alt Controller
« Reply #34 on: Tue, 11 April 2017, 21:05:31 »
Congrats on finally getting the controller to the public! Is there any estimation now of when the bluetooth controller will be finished?

I have no clear plan on Bluetooth controller, I'm not working on it currently at least.

I found some dificulties on Bluetooth controller. One of them is that FC660C controller PCB is much smaller than HHKB and this requires new design and components. It will take longer than what I expected and I'm not sure when I can have enough time to do so.

waiting is the name of the game  :-*

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: FC660C Alt Controller
« Reply #35 on: Wed, 12 April 2017, 09:16:19 »
I've got a USB one ordered, but would definitely jump on a BT one at a later date
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline robotmaxtron

  • Posts: 107
  • Location: Austin,TX
Re: FC660C Alt Controller
« Reply #36 on: Thu, 13 April 2017, 15:35:05 »
I thought I read somewhere Hasu where you said it might be possible to change the actuation point of the switches. Is that something that's still being investigated? That would be an insanely cool feature if it's possible.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #37 on: Fri, 14 April 2017, 20:42:58 »
I thought I read somewhere Hasu where you said it might be possible to change the actuation point of the switches. Is that something that's still being investigated? That would be an insanely cool feature if it's possible.

You can see test codes here, this works well for me somehow but try at your own risk.
https://github.com/tmk/tmk_keyboard/blob/fc660c_i2c/keyboard/fc660c/unimap_i2c.c

Fork fc660c_i2c branch and run 'make -f Makefile.i2c' in fc660c directory to build firmware.

// !!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!
// Writing improper value to EEPROM may mess your keyboard and
// it will require some hassles to recover it.
//
// CHECK DATASHEETS SCHEMATICS AND CODES BEFORE TRYING.
// !!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!


EDIT:
I don't still feel calm offering this function to users and default firmware won't support this for a while at least.
« Last Edit: Fri, 14 April 2017, 21:06:15 by hasu »

Offline _rubik

  • * Esteemed Elder
  • Posts: 1089
  • Location: 192.168.x.x
  • Typing on: Brutal60, Lavenders Linears, GMK Jamon
Re: FC660C Alt Controller
« Reply #38 on: Thu, 20 April 2017, 00:18:37 »
I'm wondering how much work would need to be done to get this working on other Leopolds. Like the 980c for example. Maybe only Hasu can answer this question, but is this controller hardware or software specific?
ai03 Meridian ¤ Mech 27 ¤ E8.5 ¤ Brutal60 ¤ SSK White Label ¤ HHKB Pro JP ¤ vAEK68 Alps Blues ¤ RF87u

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #39 on: Thu, 20 April 2017, 14:15:56 »
i don't have the keyboard and cant find enough pics of internals. it is difficult to say about 980c without closer inspection. I guess it is very similar, not so much hassle is required.

Offline stoic-lemon

  • Posts: 970
  • Location: Saitama, Japan
Re: FC660C Alt Controller
« Reply #40 on: Thu, 20 April 2017, 22:20:44 »
I got my controller early this week, and the keyboard yesterday. Installation went smoothly and I'm typing on the board now. Thanks Hasu!

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: FC660C Alt Controller
« Reply #41 on: Fri, 21 April 2017, 07:03:55 »
Hasu, I'll be opening my FC980C later this week to convert it to MX, let me know if you'd like any specific internal views!
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline _rubik

  • * Esteemed Elder
  • Posts: 1089
  • Location: 192.168.x.x
  • Typing on: Brutal60, Lavenders Linears, GMK Jamon
Re: FC660C Alt Controller
« Reply #42 on: Fri, 21 April 2017, 18:08:59 »
i don't have the keyboard and cant find enough pics of internals. it is difficult to say about 980c without closer inspection. I guess it is very similar, not so much hassle is required.

Hasu, I'll be opening my FC980C later this week to convert it to MX, let me know if you'd like any specific internal views!


I would really like to look into this. At this point in my keeb career, programmability is absolutely required. If you think it's possible, I may end up splurging.


ai03 Meridian ¤ Mech 27 ¤ E8.5 ¤ Brutal60 ¤ SSK White Label ¤ HHKB Pro JP ¤ vAEK68 Alps Blues ¤ RF87u

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #43 on: Fri, 21 April 2017, 19:41:18 »
Hasu, I'll be opening my FC980C later this week to convert it to MX, let me know if you'd like any specific internal views!

I'd like to see both sides of pcbs. Thanks.

Offline stoic-lemon

  • Posts: 970
  • Location: Saitama, Japan
Re: FC660C Alt Controller
« Reply #44 on: Sat, 22 April 2017, 09:34:00 »
If it looks like it would be possible, I would be willing to lend you a board to take a look at. I'll need to buy one first though, but I love that layout.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #45 on: Sat, 22 April 2017, 23:48:15 »
Thanks.  But I don't want to break virginity of your board with repeated tweaks and tinkering :D

They recently just started selling FC980C in Japan, it is not bad in terms of availability now, apart from its price.

Offline Bucake

  • Posts: 945
  • Location: The Netherlands
Re: FC660C Alt Controller
« Reply #46 on: Sun, 23 April 2017, 18:42:24 »
damn, now i have a reason..
IBM Model F XT // Realforce 87U 55g Type-S // HHKBP2 45g Type-S // KBT Pure Pro Cherry MX Red

Offline stoic-lemon

  • Posts: 970
  • Location: Saitama, Japan
Re: FC660C Alt Controller
« Reply #47 on: Mon, 24 April 2017, 22:45:12 »
Thanks.  But I don't want to break virginity of your board with repeated tweaks and tinkering :D

They recently just started selling FC980C in Japan, it is not bad in terms of availability now, apart from its price.

Yes, if you see them on sale for less than ~¥29,000, please let me know :)

Offline switchnollie

  • sleever supreme
  • * Exquisite Elder
  • Posts: 1631
  • Location: 白い帽子
  • greyhat co-leader
Re: FC660C Alt Controller
« Reply #48 on: Fri, 28 April 2017, 22:08:21 »
Think it's finally time to get a 660C :)

Been holding off due to the lack of programmability.


Keyboards: HHKB Pro 1 & OTD 356CL Dark Greyhat Edition, baybee!

Offline Karpy

  • Posts: 5
Re: FC660C Alt Controller
« Reply #49 on: Sat, 03 June 2017, 01:00:39 »
Would anyone car to share their hex file with me? I'm sure there is some good programmabilityto be done, but so far only made minor ones.

Offline hugesesame

  • Posts: 1
Re: FC660C Alt Controller
« Reply #50 on: Wed, 14 June 2017, 23:22:01 »
I got it, it works perfect ! Thanks !!

Offline sebtoun

  • Posts: 1
  • Location: France
Re: FC660C Alt Controller
« Reply #51 on: Fri, 30 June 2017, 18:23:25 »
Hey everyone,

I just received, installed and programmed mine: it went absolutely all well!
I would be glad to view your unimaps files, would you mind sharing ?

Here is my current map:
https://github.com/sebtoun/tmk_keyboard/blob/seb/keyboard/fc660c/unimap_seb.c
hex:
https://github.com/sebtoun/tmk_keyboard/blob/seb/keyboard/fc660c/binary/fc660c_seb.hex

Basically it's emu layout with Shift Parenthesis and SpaceFn (with TAPPING_TERM reduced to 200ms).

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #52 on: Fri, 30 June 2017, 20:46:29 »
Hi,
This is my current setup for FC660C which is based on 'emu' keymap and added kind of SpaceFN layer for mouse keys. It is equivalent to my keymap on my daily driver HHKB, I hold 'slash' key to change layers when I need hjkl-arrow keys :)

https://github.com/tmk/tmk_keyboard/blob/e382957c110c444bfd3c6014006e930acd6213c9/keyboard/fc660c/unimap_hasu.c

You can try it here if someone is interested :D
https://goo.gl/HfpRFd

Offline teraflame

  • Posts: 41
Re: FC660C Alt Controller
« Reply #53 on: Thu, 06 July 2017, 10:22:24 »
Hi, I am trying to get a numpad layer that can send alt codes to work. I tried P0-P9 but when I press the keys they don't do anything. Please help.
Rubber in domes

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #54 on: Thu, 06 July 2017, 10:33:17 »
Hi, I am trying to get a numpad layer that can send alt codes to work. I tried P0-P9 but when I press the keys they don't do anything. Please help.
I'm not sure but numlock state may be related?

Offline troglotype

  • Posts: 1
Re: FC660C Alt Controller
« Reply #55 on: Thu, 13 July 2017, 05:22:54 »
Hasu does sales and shipping like he does software and hardware. Enough said.

P.S. It's the little things: The caps lock light works now even if you switch the control and caps lock keys. Didn't work with the stock controller.
« Last Edit: Thu, 13 July 2017, 07:03:42 by troglotype »

Offline Auk

  • Posts: 231
Re: FC660C Alt Controller
« Reply #56 on: Sun, 16 July 2017, 08:43:17 »
...change the actuation point of the switches...

...EDIT:
I don't still feel calm offering this function to users and default firmware won't support this for a while at least...

Is changing the actuation point a feature now using the replacement controller on any of the Topre keyboards?

I'd love to be able to try tweaking the actuation point to be very early, but the only option available now is the Realforce RGB and I'd much prefer something smaller than full size.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #57 on: Sun, 16 July 2017, 08:47:25 »
not with default firmware. you have to build from source.

Offline Auk

  • Posts: 231
Re: FC660C Alt Controller
« Reply #58 on: Sun, 16 July 2017, 08:58:10 »
So I can do it if I learn how to build from source, interesting. It will require overcoming fear of screwing it up!

Is there an equivalent controller for the Realforce TKL? It's a little larger than the 660c, but 55g weight and the Silent versions are desirable features not available with Leopold as far as I can see.



« Last Edit: Sun, 16 July 2017, 09:16:27 by Auk »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #59 on: Sun, 16 July 2017, 16:30:57 »
Realforce usually has its controller integrated with key switches in one big pcb and you cannot replace only controller easily unfortunately.

So I can do it if I learn how to build from source, interesting. It will require overcoming fear of screwing it up!

Is there an equivalent controller for the Realforce TKL? It's a little larger than the 660c, but 55g weight and the Silent versions are desirable features not available with Leopold as far as I can see.






Offline Acknown3

  • Posts: 30
  • Location: Ohio
  • Not a keyboard addict
Re: FC660C Alt Controller
« Reply #60 on: Tue, 26 September 2017, 18:21:16 »
Hey Hasu, got your controller a while ago and it turned my FC660C back into my daily drive over the Whitefox, love it!

I have one question though. Just today, I disconnected my keyboard to use the USB for a controller, and then switched back to the keyboard. The insert LED lit up and the keyboard would not input. A restart solved this issue, but if I replug the keyboard, it does the same thing until I restart. I do not have a laptop to test this with, but is this a limitation of the controller or a unique case?
FC660C gray dyesub, gummyrot clack
FC660M cherry reds, Triumph Adler, blue aluminum case
Filco TKL cherry reds, white side-printed PBT
IBM Model F XT

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #61 on: Tue, 26 September 2017, 18:52:21 »
Hey Hasu, got your controller a while ago and it turned my FC660C back into my daily drive over the Whitefox, love it!

I have one question though. Just today, I disconnected my keyboard to use the USB for a controller, and then switched back to the keyboard. The insert LED lit up and the keyboard would not input. A restart solved this issue, but if I replug the keyboard, it does the same thing until I restart. I do not have a laptop to test this with, but is this a limitation of the controller or a unique case?

Hi,
You mean repluging always fails until rebooting compter? It should not happen, weird.

waht is os/hardware of your computer?






Offline Sharku

  • Posts: 15
Re: FC660C Alt Controller
« Reply #62 on: Mon, 16 October 2017, 18:23:12 »
Hello! I can say it is perfect, I plug it in and start working.
But it does not let me enter the BIOS, only once I can access, in all other attempts the screen freezes.

how can i fix it?
THX!!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #63 on: Mon, 16 October 2017, 20:07:47 »
Turn off NKRO by one of methods below.
1) press both shifts and n before using BIOS
2) build firmware with disabling NKRO in Makefile and flash it.

EDIT: NKRO keyboard tends to work with some BIOS/EFI while not with others. 6KRO is likely to always work with most BIOS/EFI.
« Last Edit: Mon, 16 October 2017, 20:12:29 by hasu »

Offline Sharku

  • Posts: 15
Re: FC660C Alt Controller
« Reply #64 on: Tue, 17 October 2017, 04:20:21 »
Turn off NKRO by one of methods below.
1) press both shifts and n before using BIOS
2) build firmware with disabling NKRO in Makefile and flash it.

EDIT: NKRO keyboard tends to work with some BIOS/EFI while not with others. 6KRO is likely to always work with most BIOS/EFI.

Both shifts and N works!

THX again!

Offline Trente

  • Posts: 172
Re: FC660C Alt Controller
« Reply #65 on: Wed, 15 November 2017, 21:20:43 »
Hi hasu,

I am trying to build on mac, but I kind of stuck on the 'brew install avr-libc' it seems I can't get it working.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #66 on: Wed, 15 November 2017, 21:56:22 »
Hi hasu,

I am trying to build on mac, but I kind of stuck on the 'brew install avr-libc' it seems I can't get it working.

I have no mac to check this but,
Can you refer this and try brew again? And let me know your result I'll update instruction.
https://github.com/osx-cross/homebrew-avr#installing-homebrew-avr-formulae

It seems 'brew intall avr-gcc' works instead.

Offline Trente

  • Posts: 172
Re: FC660C Alt Controller
« Reply #67 on: Thu, 30 November 2017, 14:43:40 »
Hi hasu,

I am trying to build on mac, but I kind of stuck on the 'brew install avr-libc' it seems I can't get it working.

I have no mac to check this but,
Can you refer this and try brew again? And let me know your result I'll update instruction.
https://github.com/osx-cross/homebrew-avr#installing-homebrew-avr-formulae

It seems 'brew intall avr-gcc' works instead.

Gotcha, i think I instead the avr-gcc instead and it works well. But one thing I just encounter is a problem in backspace and f key. It seems now if I quickly double tap the backspace it won't work at all, but this did not happened to all other key. But instead if I tap slower the backspace key just went back alive. Also the F key seem never works all of a sudden, and if I press it once I plug the board into my mac, it just split out a long string of f nonstop. I am wondering how to make sure if this would be a problem with the board or this would be a problem with the controller?

edit: I think I might know something with this situation. I had once used the mini-b to usb-c cable to connect my keyboard to the usb-c port on my mac. I am wondering if it is because the output voltage from the usb-c port is higher than 3.3 v so it simply damaged some component (since I saw there is a warning on the github site about voltage)? But would this damage be done to the circuit board with the switches on, or to the alternative controller. I hope it would be just the controller as I don't mind using rebuying a controller for $40, but if it is the circuit board with the switch on, I think it would be a horrible replacement fee simply by repurchasing the board.
« Last Edit: Thu, 30 November 2017, 14:54:26 by Trente »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #68 on: Thu, 30 November 2017, 17:33:19 »
I come up with  three culprits, firmware, hardware, and nkro compatiblity issue with macos.

1. First, did controller work well before?
If you are using your custom firmware download firmwar with default keymap from keymap editor  and flash it.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c_emu

2.  Also I'd suggest opening case to make sure that conectors are completely mated in keyboard.
I dont't think voltage is problem, both usb-c and usb 2.0 should deliver 5V to peripherals. This controller supplies 5V and 3.3V to keyswitch unit as original one exactly does, power supply is not problem even if you flashed corrupted firmware. But it is good idea to try with original controller to know your keyboard hardware is still safe.

3. This controller works in NKRO by default, this may cause this issue with macos. Try 6KRO mode instead, pressing both shifts and 'n' once after plugin. This magic key combo is needed everytime you plugin. In 6KRO mode check backspace still has the issue.
https://github.com/tmk/tmk_keyboard#magic-commands
( To discriminate between the modes just *hold* 1-7 keys in order, if you are in NKRO you should see all of those numbers on screen, if in 6KRO you won't see 7. )

Also it is good idea to check your keyboard with other pc with windows or linux.
« Last Edit: Thu, 30 November 2017, 17:36:33 by hasu »

Offline Trente

  • Posts: 172
Re: FC660C Alt Controller
« Reply #69 on: Thu, 30 November 2017, 18:47:32 »
So I had tried with the default keymap from the editor, nothing else than simply one layer, and still the missing f key happened, both windows and mac and linux. And I had also swapped the controller out and replug, and tried or even using the default one, and it seem with default controller I don't have a backspace not activated problem, but the f key missing presist. I would also try fix NKRO. But I think my F key might probably really dead. And I am wondering if it could be the spring. Since I got this board from another mechmarket, and the previous owner had once swapped the dome out.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #70 on: Thu, 30 November 2017, 19:05:32 »
yeah, that makes sense, F key probably has hardware issue probably.
When you take apart switch unit and fix the F key maintain  backspace key also. I suspect backspace has something wrong with its switch too if 6KRO doesn't cure its problem.

If those keys get lubed with oil or grease I'd reccomend to wipe it out to avoid contamination into domes and pcb.

Offline Trente

  • Posts: 172
Re: FC660C Alt Controller
« Reply #71 on: Thu, 30 November 2017, 21:59:41 »
yeah, that makes sense, F key probably has hardware issue probably.
When you take apart switch unit and fix the F key maintain  backspace key also. I suspect backspace has something wrong with its switch too if 6KRO doesn't cure its problem.

If those keys get lubed with oil or grease I'd reccomend to wipe it out to avoid contamination into domes and pcb.

Yeah I can confirm this is a hardware issue now. I just took apart the board and saw a lot of extra lube oil on PCB and springs and dome. So I used alcohol wipe to remove all of them and place the dome and springs back nicely and it magically works again.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #72 on: Fri, 01 December 2017, 00:43:05 »
Great! glad to hear the keyboard was fixed and is working now.

Offline t_southwell

  • Posts: 10
  • Location: UK
Re: FC660C Alt Controller
« Reply #73 on: Sun, 24 December 2017, 05:19:20 »
FC660C, Model F XT, AT102W, Pok3r, DIY-71, Anne Pro, Tada68, Magicforce 49, CONTRA, Smith Corona XL1500

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #74 on: Sun, 24 December 2017, 06:35:20 »
So if I wanted to make one of these I would need one of these https://www.ebay.co.uk/itm/HRS-HIROSE-DF14-20S-1-25C-HOUSING-DF14-1-25MM-20WAY/171948274249?hash=item2808ea7249:g:jzEAAOxy3HJTIjFU and a pro micro?

Yes, Hirose DF14 20pin connector is exactly what the keyboard use, whether you need socket(plug) or header(jack) depends on how you connect. Pro micro should work or easy to port if not, just check that it has enough pinouts.

Offline Karpy

  • Posts: 5
Re: FC660C Alt Controller
« Reply #75 on: Fri, 05 January 2018, 01:56:28 »
So atmel FLIP can not longer be downloaded. Went to go change up my layout and now I can't since I don't have Flip anymore. Anyway around this?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #76 on: Fri, 05 January 2018, 05:51:49 »
So atmel FLIP can not longer be downloaded. Went to go change up my layout and now I can't since I don't have Flip anymore. Anyway around this?

I think this is temporary problem and it will come back before long, but you can access FLIP download page via archive.org.
https://web.archive.org/web/20180101230600/http://www.atmel.com/tools/FLIP.aspx

Or dfu-programmer is another option.
https://github.com/tmk/tmk_keyboard/wiki#dfu-programmer-for-windows-mac-and-linux

Also you can use avrdude to flash like this:
Code: [Select]
avrdude -c flip1 -p m32u4 -U flash:w:../terminal_usb/terminal_lufa.hex
http://www.nongnu.org/avrdude/

Offline k2w2yut

  • Posts: 1
Re: FC660C Alt Controller
« Reply #77 on: Fri, 09 February 2018, 10:03:56 »
Hi Hasu,

Any progress on Bluetooth version?
...or I should not expect it soon, says in 3 months... :'(

Offline Meenu

  • Posts: 1
Re: FC660C Alt Controller
« Reply #78 on: Sat, 17 February 2018, 10:06:15 »
Sir, could you give me a hint when the BT controller might launch? BTed 660c will be a total game changer.. I envy HHKB users who have BT controller.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #79 on: Sun, 18 February 2018, 20:14:18 »
No plan for Bluetooth version at this point.  I don't time to work on this for a while unfotunately.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #80 on: Sun, 01 April 2018, 00:37:46 »
I got a quesion via Private Message and would share it.

Quote
I saw that some optical boards have the ability to trigger two different key presses and different actuation points.  Do you think this is possible with topre boards?

For example, binding Home and Page Up to the same key, a full press sends Home, and a light press sends Page Up.

Unfortunately you cannot implement key behaviour you described because FC660C switches don't send analog value of key stroke to controller. Topre capacitive switches work just like normal binary switch  from controller's aspect.

To implement this you have to replace bigger swich board PCB, not just controller.

Offline elcubismo

  • Posts: 171
  • Location: San Antonio, TX, USA
    • Reddit page
Re: FC660C Alt Controller
« Reply #81 on: Thu, 10 May 2018, 15:13:24 »
Any way to set it up so that any key press will briefly turn on one or both LEDs? Just a fun thought I had.
Leopold FC660C lubed, silenced with landing pads | Norbatouch lubed, silenced with hyperspheres | Poker II MX Blue with vortex aluminum case, vortex red/white doubeshot pbt caps and o-rings | CODE TKL MX Clear with Miami | Unicomp Buckling Spring | GMMK with rainbow vomit switches, mostly jailhouse blues and pandealios

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #82 on: Thu, 10 May 2018, 18:00:09 »
Any way to set it up so that any key press will briefly turn on one or both LEDs? Just a fun thought I had.

Try this patch, you can add it to your keymap file. It turns on Leds for 100ms when any key is pressed. Also compiled hex file are attached just for a try.

Code: [Select]
diff --git a/keyboard/fc660c/unimap.c b/keyboard/fc660c/unimap.c
index 77c3350..9dbd04c 100644
--- a/keyboard/fc660c/unimap.c
+++ b/keyboard/fc660c/unimap.c
@@ -17,3 +17,21 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT
     ),
 };
+
+
+#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
+#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
+#define LED_DURATION    100
+static uint16_t last_ms = 0;
+void hook_matrix_change(keyevent_t event) {
+    if (event.pressed) {
+        LED_ON();
+        last_ms = timer_read();
+    }
+}
+
+void hook_keyboard_loop(void) {
+    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
+        LED_OFF();
+    }
+}


EDIT: Fixed message quote.
« Last Edit: Thu, 10 May 2018, 18:06:04 by hasu »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #83 on: Thu, 10 May 2018, 18:20:05 »
Hi folks,
Anyone already grabbed new FC660C and tried this controller yet?
I like to know whether the Alt Controller works with the new FC660C or not. Also pics of inside of the new keyboard would be helpful.


here's the black/black fc660c
https://www.reddit.com/r/MechanicalKeyboards/comments/8if8sa/all_black_fc660c_made_in_japan/?st=jh0zb7es&sh=d09eb378

here's the blue/grey fc660c
https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=4096

Thanks

Offline elcubismo

  • Posts: 171
  • Location: San Antonio, TX, USA
    • Reddit page
Re: FC660C Alt Controller
« Reply #84 on: Fri, 11 May 2018, 09:44:21 »
Any way to set it up so that any key press will briefly turn on one or both LEDs? Just a fun thought I had.

Try this patch, you can add it to your keymap file. It turns on Leds for 100ms when any key is pressed. Also compiled hex file are attached just for a try.

Code: [Select]
diff --git a/keyboard/fc660c/unimap.c b/keyboard/fc660c/unimap.c
index 77c3350..9dbd04c 100644
--- a/keyboard/fc660c/unimap.c
+++ b/keyboard/fc660c/unimap.c
@@ -17,3 +17,21 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT
     ),
 };
+
+
+#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
+#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
+#define LED_DURATION    100
+static uint16_t last_ms = 0;
+void hook_matrix_change(keyevent_t event) {
+    if (event.pressed) {
+        LED_ON();
+        last_ms = timer_read();
+    }
+}
+
+void hook_keyboard_loop(void) {
+    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
+        LED_OFF();
+    }
+}


EDIT: Fixed message quote.

Thanks Hasu! I'll have to give this a shot soon.
Leopold FC660C lubed, silenced with landing pads | Norbatouch lubed, silenced with hyperspheres | Poker II MX Blue with vortex aluminum case, vortex red/white doubeshot pbt caps and o-rings | CODE TKL MX Clear with Miami | Unicomp Buckling Spring | GMMK with rainbow vomit switches, mostly jailhouse blues and pandealios

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #85 on: Sun, 20 May 2018, 21:17:46 »
Hi folks,
Anyone already grabbed new FC660C and tried this controller yet?
I like to know whether the Alt Controller works with the new FC660C or not. Also pics of inside of the new keyboard would be helpful.


here's the black/black fc660c
https://www.reddit.com/r/MechanicalKeyboards/comments/8if8sa/all_black_fc660c_made_in_japan/?st=jh0zb7es&sh=d09eb378

here's the blue/grey fc660c
https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=4096

Thanks

Some user on Reddit posted this pics of new "Made in Japan" model.  The controller seems to me be exactly identical to one from 'Made in China' model. I'm 99.9% sure my Alt controller still work with the 'Made in Japan' model.

https://imgur.com/a/k2uvVU9

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #86 on: Fri, 08 June 2018, 20:28:33 »
Hi folks,
Anyone already grabbed new FC660C and tried this controller yet?
I like to know whether the Alt Controller works with the new FC660C or not. Also pics of inside of the new keyboard would be helpful.


here's the black/black fc660c
https://www.reddit.com/r/MechanicalKeyboards/comments/8if8sa/all_black_fc660c_made_in_japan/?st=jh0zb7es&sh=d09eb378

here's the blue/grey fc660c
https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=4096

Thanks

Some user on Reddit posted this pics of new "Made in Japan" model.  The controller seems to me be exactly identical to one from 'Made in China' model. I'm 99.9% sure my Alt controller still work with the 'Made in Japan' model.

https://imgur.com/a/k2uvVU9

Great news here. It was confirmed by an user today!
The controller works fine with the new 'Made in Japan' model also.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #87 on: Thu, 02 May 2019, 23:16:56 »
Also confirmed this works with this 'Made in Japan' model FC660C/EBL. This controller is supposed to be compatible to all models of FC660C as of now.

https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=4097

Offline heyitsqi

  • Posts: 69
Re: FC660C Alt Controller
« Reply #88 on: Tue, 14 May 2019, 14:37:06 »
Has anyone thought of modding a USB-C port onto this controller? (Yes I know the default case doesn't fit, I'm not worried about that). Wondering how much work it'd be and if it's fairly straight forward or if there's any pins and stuff I'd have to re-do/modify.

Offline hansmuff

  • Posts: 10
Re: FC660C Alt Controller
« Reply #89 on: Wed, 15 May 2019, 14:55:26 »
Hi,

I just bought two controllers for my 660c boards. Install went flawlessly and my keyboard (I only installed in one for now) works.
However, I can't seem to program it.

I installed Amtel Studio 7 (as someone suggested to do when DLLs aren't found.. this fixed it.. thanks, kind soul!) and then installed flip.
Flip runs. I select the correct chip atimega32u4 and then select USB. Have to put the keyboard into flash mode, done. USB connects.
I create a simple layout with L1 having F keys and I swap Windows and Fn key. Download the hex file and load it into flip.
Then flash it. All steps run through (Erase, Check, Program, Verify) successfully.
Then I disconnect and reconnect the keyboard and.. it still has the old layout in it. The stock layout.

What am I doing wrong?
This is a Windows 10 64-bit machine, if that matters.


Never.. mind. I didn't switch LGUI in the editor properly. It all works now. What a fantastic controller!


For those who are new to this world as I was, my steps I had to do:

1. Download and install Amtel Studio 7. Large install but it gives you drivers you will need.
https://www.microchip.com/mplab/avr-support/atmel-studio-7

2. Download flip with JRE and install. For me, the install ran but the JRE did not install properly and I got errors on startup.
https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/FLIP
2a. If the JRE did not install: Use 7zip to extract the downloaded installer .EXE. In $TEMP there's jre_setup.exe, run that and you'll get the JRE.

3. Watch this video but I have a few more tips around it:
Tips:
1. When you start Flip for the very first time, you have to click the chip on the left (the icon) and select ATMega32u4
2. When opening up the keyboard, the video is good about this but I found using a wide screwdriver and wiggling it slighly to unlock the tabs to work super easy when you start with the ones on the inside first and then go on the corners. I had zero scratches and didn't have to bend anything.

4. When you create your first layout, do something SIMPLE or you might fall into the trap I did and think one of the tools doesn't work. Like, map [ to A or something benign.
« Last Edit: Wed, 15 May 2019, 15:41:12 by hansmuff »

Offline wes1099

  • Posts: 221
  • Location: Centreville, Virginia
  • Technology and Dog Enthusiast
Re: FC660C Alt Controller
« Reply #90 on: Wed, 15 May 2019, 17:39:15 »
Has anyone thought of modding a USB-C port onto this controller? (Yes I know the default case doesn't fit, I'm not worried about that). Wondering how much work it'd be and if it's fairly straight forward or if there's any pins and stuff I'd have to re-do/modify.
It may be possible to squeeze one in if you find a USB C connector small enough and are willing to cut the case a little bit. I just ordered parts to build one of these controllers with a Teensy 2.0 and I am going to wire it to a panel mount USB-C connector. Building the controller from a teensy takes up significantly less space so you have more room to fit a USB C connector. Only downside is that the teensy can't mount to the case like the normal PCB can. I plan on posting pictures of the process when I get the parts on Friday.
                                      
[Leopold FC660C]     [GON NeRD 60]    [Infinity Keyboard]    [ Model M Silver Label]
[Topre 45g Silent]     [Gateron Black]    [Cherry MX Black]     [Model Number 1390636]
                                                                                         [May 20, 1987]

Offline hansmuff

  • Posts: 10
Re: FC660C Alt Controller
« Reply #91 on: Wed, 15 May 2019, 23:02:17 »
US FC660C with Alt Controller. I use the TMK keymap editor and flip to alter my keyboard layout.

One of my hopes was that I could designate a modifier key to switch to a layer that produces German Umlauts, a u o with the dots on them. But I haven't found a way to get that working and all I find via google is murky at best.

I am strictly a Windows user, at least for the purpose of needing those characters. I realize I could use AHK, and I might do that if I have to. But doing it all via the keyboard controller would be so much cleaner.

Is this something that can't be done, should I stop looking? Any hints appreciated. Perhaps if there's some hacking in C code required, I might be able to do this as a work of passion but I would need just a hint as to where to look and generally what would need to be done..
« Last Edit: Wed, 15 May 2019, 23:45:58 by hansmuff »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #92 on: Wed, 15 May 2019, 23:39:40 »
You may want to check these.  I think the "modified keys" can be assigned to any key on a layer you defined if you are still using German-supported/International keyboard layout.

https://github.com/tmk/tmk_keyboard/wiki/FAQ-Keymap#1-keyboard-layout
https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#212-modified-key

This keymapping topic is not specific to FC660C Alt Controller, so feel free to post in thread or TMK firmware if you have any further question.
https://geekhack.org/index.php?topic=41989.0


US FC660C with Alt Controller:

One of my hopes was that I could designate a modifier key to switch to a layer that produces German Umlauts, a u o with the dots on them. But I haven't found a way to get that working and all I find via google is murky at best.

I am strictly a Windows user, at least for the purpose of needing those characters. I realize I could use AHK, and I might do that if I have to. But doing it all via the keyboard controller would be so much cleaner.

Is this something that can't be done, should I stop looking? Any hints appreciated. Perhaps if there's some hacking in C code required, I might be able to do this as a work of passion but I would need just a hint as to where to look and generally what would need to be done..

« Last Edit: Wed, 15 May 2019, 23:45:40 by hasu »

Offline hansmuff

  • Posts: 10
Re: FC660C Alt Controller
« Reply #93 on: Fri, 17 May 2019, 08:01:40 »
My quest to Umlauts has lead me to a different solution that works perfectly well for my scenario:
https://eurkey.steffen.bruentjen.eu/

The left alt key acts as AltGr automatically, at least in Windows 10. Perhaps someday when I have more time I will investigate how to do the umlauts via keyboard controller but today is not that day  :cool:

Offline SpatiallyAware

  • Posts: 66
Re: FC660C Alt Controller
« Reply #94 on: Mon, 13 January 2020, 08:35:00 »
Hello, I am having some problems with my pegasus hoof, basically, I'm having issues with repeating or stuck keys. It's very noticeable with N, but also happens with X and randomly other keys. It seems to happen worse if it's cold (I primarily use this keyboard in an enclosed patio). I've swapped it with the OEM filco controller on another TKL and the problem follows the Pegasus Hoof. It's not key bounce, sometimes it will repeat the key 5 or 6 times. It sort of looks/feels like a stuck key rather than a key that is "repeating". I've tried reflashing it with no luck. I'm not doing anything odd with the programming, really just converting some F keys to do volume and brightness. I would blame the keyboard if not for the fact that it very noticeably follows the controller when moved to another board.

Thanks for any input

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: FC660C Alt Controller
« Reply #95 on: Mon, 13 January 2020, 16:53:21 »
You are in wrong thread probably?
This thread is for FC660C controller.


EDIT:
I believe that bpiphany designed 'pegasus hoof' controller, but you will have to seller first.
Maybe, you can contact with bpiphany in this thread?
https://geekhack.org/index.php?topic=46700.0
« Last Edit: Mon, 13 January 2020, 17:35:00 by hasu »

Offline SpatiallyAware

  • Posts: 66
Re: FC660C Alt Controller
« Reply #96 on: Tue, 14 January 2020, 13:30:15 »
Yes, you are correct. My apologies, wrong thread

Offline gnho

  • Posts: 147
  • Location: ATX/US
Re: [TMK] FC660C Alt Controller
« Reply #97 on: Sun, 15 March 2020, 22:34:04 »
Actually I just realized what the problem is. Please ignore.

Offline bevoc

  • Posts: 1
Re: [TMK] FC660C Alt Controller
« Reply #98 on: Sat, 09 May 2020, 15:01:01 »
i am trying to make the controller using a pro micro which does not have these pins available

1. B0 (occupied by rx led)
2. C7
3. D5 (occupied by tx led)
4. D6

anyone has made the alt controller using a promicro? i have opened the tmk source and at a lost about the pin assignment. any help is appreciated.

Offline microCuts

  • Posts: 10
Re: FC660C Alt Controller
« Reply #99 on: Wed, 23 December 2020, 10:16:41 »
Any way to set it up so that any key press will briefly turn on one or both LEDs? Just a fun thought I had.

Try this patch, you can add it to your keymap file. It turns on Leds for 100ms when any key is pressed. Also compiled hex file are attached just for a try.

Code: [Select]
diff --git a/keyboard/fc660c/unimap.c b/keyboard/fc660c/unimap.c
index 77c3350..9dbd04c 100644
--- a/keyboard/fc660c/unimap.c
+++ b/keyboard/fc660c/unimap.c
@@ -17,3 +17,21 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT
     ),
 };
+
+
+#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
+#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
+#define LED_DURATION    100
+static uint16_t last_ms = 0;
+void hook_matrix_change(keyevent_t event) {
+    if (event.pressed) {
+        LED_ON();
+        last_ms = timer_read();
+    }
+}
+
+void hook_keyboard_loop(void) {
+    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
+        LED_OFF();
+    }
+}


EDIT: Fixed message quote.

Hi Hasu,

I wanted to do the same for the insert LED to blink per keystroke. I tried your hex file, it works. However when i added the code from you quote my led do nothing.

This is the code i added at the end of my file.

----------------------------------------------------------------------
#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
#define LED_DURATION    100
static uint16_t last_ms = 0;
void hook_matrix_change(keyevent_t event) {
    if (event.pressed) {
        LED_ON();
        last_ms = timer_read();
    }
}

void hook_keyboard_loop(void) {
    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
        LED_OFF();
    }
}
--------------------------------------------------------------------------------------

I didnt add the upper portion of the code from your quote because it gives errors whenever I compiled.  And i guess they are not necessary?

Thanks in advanced.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #100 on: Wed, 23 December 2020, 16:56:32 »
Yes, you just have to add '+' prefixed lines.
What's you file name? What command do you compile it with?

Port PB5 is used for Instert LED and PB6 for CapsLock LED. You will have to change only LED_ON and  LED_OFF.

Offline microCuts

  • Posts: 10
Re: [TMK] FC660C Alt Controller
« Reply #101 on: Wed, 23 December 2020, 21:38:37 »
Ya i understand so i tried with both LED on first. However it gives no response on my own compiled hex.

This is the full codes of my keymap.c

-----------------------------------------------------------------------------
#include QMK_KEYBOARD_H

#define _LAYER0 0
#define _LAYER1 1
#define _LAYER2 2
#define _LAYER3 3

enum custom_keycodes {
    LAYER0 = SAFE_RANGE,
    LAYER1,
    LAYER2,
    LAYER3,
};

 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

 [_LAYER0] = LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LALT, MO(3), KC_LGUI, KC_SPC, MO(3), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

[_LAYER1] = LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LCTL, MO(3), KC_LALT, KC_SPC, MO(3), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

[_LAYER2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PMNS, KC_PMNS, KC_NO, KC_BSPC, KC_HOME, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_DEL, KC_END, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_NO, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P0, KC_P0, KC_PDOT, KC_NO, TG(2), KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),

[_LAYER3] = LAYOUT(KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)

};

#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
#define LED_DURATION    100
static uint16_t last_ms = 0;
void hook_matrix_change(keyevent_t event) {
    if (event.pressed) {
        LED_ON();
        last_ms = timer_read();
    }
}

void hook_keyboard_loop(void) {
    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
        LED_OFF();
    }
}
-----------------------------------------------------------------------------------------

Not really sure what is wrong as my coding knowledge is very limited..

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #102 on: Wed, 23 December 2020, 21:45:18 »
That patche is for TMK and won't work with QMK. You have to port the code to QMK.
I think you can consult with its document and comunity.

Offline microCuts

  • Posts: 10
Re: [TMK] FC660C Alt Controller
« Reply #103 on: Wed, 23 December 2020, 22:05:02 »
Understand and thanks! Will explore that my own :)

Offline skimzor

  • Posts: 37
  • Location: San Jose, CA
Re: [TMK] FC660C Alt Controller
« Reply #104 on: Thu, 24 December 2020, 20:11:31 »
hi hasu.  thank you for providing the schematics to make my own controller.  i pretty much copied your controller but i'm using different pins.  i kind of understand some of the TMK code, but am at a loss on how to assign the pins for the rows and columns.  am i on the right track with the following code?

Code: [Select]
* Pin configuration for ATMega32U4
 *
 * Row:     PB6, PF7, PB5, PB7(~EN)
 * Col:     PF6, PB4, PF5, PD7(Z5 ~EN), PF4(Z4 ~EN)
 * Key:     PD4(pull-uped)
 * Hys:     PF0
 */

static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<7)); }
static inline void KEY_UNABLE(void) { (PORTB |= (1<<7)); }
static inline bool KEY_STATE(void) { return (PIND & (1<<4)); }
static incline void KEY_HYS_ON(void) {PORTF |= (1<<0)); }
static inline void KEY_HYS_OFF(void) { (PORTF &= ~(1<<0)); }
static inline void KEY_INIT(void)
{
    /* Col */
    DDRB  |=  0x10;
    DDRD  |=  0x80;
    DDRF  |=  0x70;
    /* Key: input with pull-up */
    DDRD  &= ~(1<<4);
    PORTD |=  (1<<4);
    /* Hys */
    DDRF  |=  (1<<0);
    /* Row */
    DDRB  |=  0xE0;
    DDRF  |=  0x80;

    KEY_UNABLE();
    KEY_HYS_OFF();
}

if the above is correct, how would i set the row and col in the next few lines?  thank you for all your work!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #105 on: Thu, 24 December 2020, 21:15:19 »
You looks so.

I can't say if your code is correct totally, because I don't have time enough to check it closely and don't know exact your pin configuration.
You can share your circuit schematic and pics of pcb here to get further help. And what's your problem exactly? Your code didn't work?

Also share your entire code on github(or other site), it would be useful for the community.

You may want to check fc660c.c and read the first post to understand how FC660C controller scans its key matrix. I'd reccomend to take time to do this.
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/fc660c

And note that you can use `xprintf()` to debug your code. It is extremely useful when tweaking code.

Offline skimzor

  • Posts: 37
  • Location: San Jose, CA
Re: [TMK] FC660C Alt Controller
« Reply #106 on: Fri, 25 December 2020, 11:59:22 »
Hi hasu - thank you for taking a look.

I think I understand how to assign the row and column pins, but I'm not sure how to set them if that makes sense?  Particularly the SET_ROW and SET_COL lines:

Code: [Select]
#ifndef FC660C_H
#define FC660C_H

#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "timer.h"
#include "unimap.h"


// Timer resolution check
#if (1000000/TIMER_RAW_FREQ > 20)
#   error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB."
#endif


/*
 * Pin configuration for ATMega32U4
 *
 * Row:     PB5, PB6, PB7(~EN), PF7
 * Col:     PF4(Z4 ~EN), PF5, PF6, PD7(Z5 ~EN), PF5
 * Key:     PD4(pull-uped)
 * Hys:     PF0
 */
static inline void KEY_ENABLE(void) { (PORTD &= ~(1<<7)); }
static inline void KEY_UNABLE(void) { (PORTD |=  (1<<7)); }
static inline bool KEY_STATE(void) { return (PINC & (1<<6)); }
static inline void KEY_HYS_ON(void) { (PORTC |=  (1<<7)); }
static inline void KEY_HYS_OFF(void) { (PORTC &= ~(1<<7)); }
static inline void KEY_INIT(void)
{
     /* Col */
    DDRB  |=  0x10;
    DDRD  |=  0x80;
    DDRF  |=  0x70;
    /* Key: input with pull-up */
    DDRD  &= ~(1<<4);
    PORTD |=  (1<<4);
    /* Hys */
    DDRF  |=  (1<<0);
    /* Row */
    DDRB  |=  0xE0;
    DDRF  |=  0x80;

    KEY_UNABLE();
    KEY_HYS_OFF();
}
static inline void SET_ROW(uint8_t ROW)
{
    // set row with unabling key
    PORTD = (PORTD & 0x0F) | (1<<7) | ((ROW & 0x07) << 4);
}
static inline void SET_COL(uint8_t COL)
{
    //         |PD7(Z5 ~EN)|PF4(Z4 ~EN)
    // --------|-----------|-----------
    // Col:0-7 |high       |low
    // Col:8-F |low        |high
    PORTB = (PORTB & 0xE0) | ((COL & 0x08) ? 1<<4 : 1<<3) | (COL & 0x07);
}

Thank you for your help!
https://github.com/skimzor/sz660c-altctrl
« Last Edit: Sun, 27 December 2020, 10:11:12 by skimzor »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #107 on: Fri, 25 December 2020, 19:01:26 »
I can't remember the details without traversing schematic and my code again but I think the macros just drive matrix lines one by one with multiplexers(4051, 138).
If you read schematic and datasheets closely  it would be straight, no tricks there.

Nice pcb layout! Btw, what is J3 connector for?

Offline skimzor

  • Posts: 37
  • Location: San Jose, CA
Re: [TMK] FC660C Alt Controller
« Reply #108 on: Fri, 25 December 2020, 19:44:41 »
I think I understand, but I'm quite new to the firmware coding aspect of keyboards so I'll have to keep playing around with it.  The J3 connector is for a companion MX/ALPS PCB that fits in the FC660C case.  It uses an additional 5 unused pins from the atmega for the PCB matrix (firmware for mechanical switches are way easier than capacitance :D).  So users have the choice of flashing different firmware based on what PCB they're using.

It works using the OEM cable, but I need to source some DF14 cable harnesses that are long enough to reach the PCB connector. 

« Last Edit: Sun, 27 December 2020, 10:11:23 by skimzor »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #109 on: Fri, 25 December 2020, 21:15:42 »
Looks great!
Good luck with your project.


Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] FC660C Alt Controller
« Reply #110 on: Sat, 21 August 2021, 06:06:53 »
I just got question about Esc/~` behaviour by email and found that this link was not in the first post.

Emulation keymap: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?fc660c_emu

This keymap emulates FC660C stock behaviour on Esc/~`, Fn+Esc and Fn+q.

Also added 'How to control LEDs' section.


Offline MatthewEncina

  • Posts: 1
Re: [TMK] FC660C Alt Controller
« Reply #111 on: Sun, 27 March 2022, 08:54:37 »
Curious if anyone has been able to make the board VIA compatible?

I saw this on Github, (https://github.com/qmk/qmk_firmware/tree/master/keyboards/fc660c/keymaps/via) but I'm completely out of my depths on how to make this work?. Do I add something from here to the HEX file manually? Any help is greatly appreciated!