Author Topic: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!  (Read 106146 times)

0 Members and 1 Guest are viewing this topic.

Offline wakko

  • Posts: 96
  • Location: Austin, TX
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #350 on: Thu, 09 July 2015, 11:19:57 »
so i realized that to get the characters on the lower fn layer, the shift key is pressed so that's all working fine actually.

i uninstalled karabiner but still get no command key.

You mentioned all of the keys showing up in the OS when testing - are you sure the GUI key is doing that?

You can also check your system preferences under "Keyboard" and "Modifier Keys..." - this is what mine looks like:

Show Image


the system preferences does look like that.

all the keys show up except the GUI key, even if i remap to a different switch in the firmware. the GUI keypress doesn't show at all in the testing tool. nothing seems to happen.

In the firmware, what does your config.h file look like? Specifically, this section:

Code: [Select]
#define IS_COMMAND() ( \
    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

If it's MOD_BIT(KC_LGUI), it would cause the GUI keypress to not pass through the firmware.

Have you tried mapping KC_RGUI to anything?


This is what it looks like

/* key combination for command */
#define IS_COMMAND() ( \
    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)


I tried mapping RGUI to the meta key (BL_STEP). that didn't work either. I'll trying moving it around later tonight but even with other firmwares in your repo, the GUI key was mapped to different positions but that key never registered.
NOOB
KUL ES-87

Offline wakko

  • Posts: 96
  • Location: Austin, TX
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #351 on: Thu, 09 July 2015, 23:19:53 »
so i setup a layer like this to test and it generates the GUI key mostly correctly; the tab key doesn't exactly behave properly because it generates multiple keypresses as it's held down.

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  • = { /* Qwerty */

  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,   KC_BSPC},
  {KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN,  KC_QUOT},
  {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT},
  {BL_STEP, KC_LCTL, KC_LALT, FUNC(3), FUNC(2),    KC_SPC,   KC_SPC,    FUNC(1),   KC_LEFT, KC_DOWN, KC_UP,  KC_RGHT}
                                                // Space is repeated to accommadate for both spacebar wiring positions
},
[1] = {
  {LGUI(KC_GRV),  LGUI(KC_Q),    LGUI(KC_W),    KC_E,    LGUI(KC_R),    LGUI(KC_T),    KC_Y,    LGUI(KC_U),    LGUI(KC_I),    LGUI(KC_O),    LGUI(KC_P),   KC_BSPC},
  {LGUI(KC_TAB),  LGUI(KC_A),    LGUI(KC_S),    KC_D,    LGUI(KC_F),    LGUI(KC_G),    LGUI(KC_H),    KC_J,    KC_K,    LGUI(KC_L),    KC_SCLN,  KC_QUOT},
  {LGUI(KC_LSFT), LGUI(KC_Z),    LGUI(KC_X),    LGUI(KC_C),    LGUI(KC_V),    LGUI(KC_B),    LGUI(KC_N),    LGUI(KC_M),    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT},
  {LGUI(KC_1), KC_LCTL, KC_LALT, FUNC(3), KC_TRNS,    KC_SPC,   KC_SPC,    KC_TRNS,   LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_UP),  LGUI(KC_RGHT)}
},
[2] = { /* Colemak */
  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
  {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,     KC_QUOT},
  {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT},
  {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2),    KC_SPC,   KC_SPC,    FUNC(1),   KC_LEFT, KC_DOWN, KC_UP,  KC_RGHT}
},
[3] = { /* RAISE */
  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
  {KC_TRNS, FUNC(4), FUNC(5), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
  {KC_TRNS, KC_F11,  KC_F12,  KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20, KC_TRNS},
  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,    KC_TRNS,   KC_TRNS,  FUNC(1),   KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[4] = { /* LOWER */
  {S(KC_GRV),  S(KC_1),    S(KC_2),    S(KC_3),    S(KC_4),    S(KC_5),    S(KC_6),    S(KC_7),    S(KC_8),    S(KC_9),    S(KC_0), KC_BSPC},
  {KC_TRNS, FUNC(4), FUNC(5), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL),  S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
  {KC_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_TRNS},
  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2),   KC_TRNS,   KC_TRNS,   KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}
};

this is the default extended keymap... there is something that's preventing LGUI/RGUI from registering...
« Last Edit: Thu, 09 July 2015, 23:22:36 by wakko »
NOOB
KUL ES-87

Offline wakko

  • Posts: 96
  • Location: Austin, TX
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #352 on: Sat, 11 July 2015, 01:05:50 »
i tried easy avr and was able to get the command key recognized without issues. typing on the planck right now. i wonder what the issue is with the default firmware. i go the latest from jack's repo and built it unmodified and then tried remapping the GUI key to different switches to no avail.

the keyboard is working properly, so i'm good. i can finally learn to use it :)
NOOB
KUL ES-87

Offline jackhumbert

  • Thread Starter
  • Posts: 85
  • Location: Indiana
  • OLKB
    • OLKB.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #353 on: Mon, 20 July 2015, 21:01:19 »


Atomic PCB/other parts are now for sale, and expected in late August! Click the image, or check them out here: http://ortholinearkeyboards.com/atomic-keyboard-kit

Offline simonyunhe

  • Posts: 238
  • Location: Alxa, China
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #354 on: Tue, 21 July 2015, 00:06:13 »

Show Image


Atomic PCB/other parts are now for sale, and expected in late August! Click the image, or check them out here: http://ortholinearkeyboards.com/atomic-keyboard-kit
Hi Jack
Can you confirm if the keycap is Dsa laser print?
KeyBs:|RS96-Brown|GS-87-White|DIYer60-Red|VA68M-Brown|Matrix Cain-?|GS-ALT71-Blue|
KeyCs:|SA Carbon R1+2|SA Camping|SA Amazing Chocolatier|SA Commando 88 Ghost|SA Dasher & Dancer+Blue Add-on|SA Hyperfuse|SA Penumbra|SA Doom|SA Creamy Orange|SA Ocean Dolch|SA Lotus*72|SA Trouble Minds R2|DSA Granite|GMK TA|GMK CMYK|GMK Soware|XDA Mailstone|GM Ember|

Offline Data

  • Posts: 2606
  • Location: Orlando, FL
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #355 on: Tue, 21 July 2015, 08:38:53 »
Show Image


Atomic PCB/other parts are now for sale, and expected in late August! Click the image, or check them out here: http://ortholinearkeyboards.com/atomic-keyboard-kit

AW YISS!

Jack, how will the production PCBs differ from the prototypes?  Did you guys make any changes?
« Last Edit: Tue, 21 July 2015, 08:41:54 by Data »

Offline Data

  • Posts: 2606
  • Location: Orlando, FL
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #356 on: Fri, 24 July 2015, 10:23:49 »
Jack, you indicated that there were a few prototype PCBs available.  Do you think my order will ship this week?

Offline jackhumbert

  • Thread Starter
  • Posts: 85
  • Location: Indiana
  • OLKB
    • OLKB.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #357 on: Fri, 24 July 2015, 10:31:11 »
Hi Jack
Can you confirm if the keycap is Dsa laser print?

Keycaps are all blank! Might be able to offer custom laser print/etching in the future, though!

AW YISS!

Jack, how will the production PCBs differ from the prototypes?  Did you guys make any changes?

Jack, you indicated that there were a few prototype PCBs available.  Do you think my order will ship this week?

Had to confirm with Wilba, but it looks like everything on the prototype run was good for production! I'm still getting caught-up with orders, but you're getting one of the prototypes, and your order is marked to ship! :) I should be able to get it out next week!

Offline Data

  • Posts: 2606
  • Location: Orlando, FL
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #358 on: Fri, 24 July 2015, 15:48:33 »
Hi Jack
Can you confirm if the keycap is Dsa laser print?

Keycaps are all blank! Might be able to offer custom laser print/etching in the future, though!

AW YISS!

Jack, how will the production PCBs differ from the prototypes?  Did you guys make any changes?

Jack, you indicated that there were a few prototype PCBs available.  Do you think my order will ship this week?

Had to confirm with Wilba, but it looks like everything on the prototype run was good for production! I'm still getting caught-up with orders, but you're getting one of the prototypes, and your order is marked to ship! :) I should be able to get it out next week!

Right on!  Thanks.

Offline Data

  • Posts: 2606
  • Location: Orlando, FL
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #359 on: Tue, 04 August 2015, 10:20:07 »
I received my PCB yesterday, promptly SQUEE'd, and got right to work on it.

The first thing I did was polish up the plate and case.


Compare with the unpolished "inside" of the case:


Then started assembly with MX Blacks and bright white LEDs.


This was some of the trickiest soldering I've ever done.  Close quarters!




I think it turned out great.


Dat reflection...


Full album: http://imgur.com/a/rwyNn

Thanks, Jack.  This was a lot of fun.  I'm diving into the firmware now to figure out how I want the layers setup and tweaking some of the key assignments.  This thing is awesome.  :D

Offline stoic-lemon

  • Posts: 967
  • Location: Saitama, Japan
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #360 on: Tue, 04 August 2015, 17:19:52 »
You've done a great job there. It looks amazing.

Offline Nai_Calus

  • * Destiny Supporter
  • Posts: 565
  • Location: Middle of nowhere, CA
  • CLACK
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #361 on: Tue, 04 August 2015, 17:26:47 »
Alas, it looks like the layout I'd want to do on a 5x15 ortho isn't doable:

http://www.keyboard-layout-editor.com/#/gists/fa4901ae757529d09351

Tiny violin. :<
- IBM 4704 Model F 107-key "Bertha"
Other boards: Kinesis Essential, Infinity(G.Clears), Ergodox(MX Blues), Monoprice 9433

Eternally searching for Celestial Blue BS V2 and blue/purple Bros.

Offline jackhumbert

  • Thread Starter
  • Posts: 85
  • Location: Indiana
  • OLKB
    • OLKB.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #362 on: Thu, 13 August 2015, 00:08:50 »
I received my PCB yesterday, promptly SQUEE'd, and got right to work on it.

Thanks, Jack.  This was a lot of fun.  I'm diving into the firmware now to figure out how I want the layers setup and tweaking some of the key assignments.  This thing is awesome.  :D

Awesome! That's looking great :) Love the polished plates!

Offline jackhumbert

  • Thread Starter
  • Posts: 85
  • Location: Indiana
  • OLKB
    • OLKB.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #363 on: Thu, 13 August 2015, 00:10:23 »
The Planck is on Massdrop! Orange milled case, 4 new wood middles, and brass plate options!
https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open

Thanks for your support everybody! Couldn't have made it this far without you :)

Hope you enjoy some of the options we have setup!

Offline Bloo

  • Posts: 25
  • Location: Cold.
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #364 on: Thu, 13 August 2015, 01:04:39 »
Very cool.  And that keycap layer diagram is the best explanation I've seen so far.  This should go well.

Offline zenless

  • Posts: 101
  • Location: Maine
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #365 on: Thu, 13 August 2015, 07:58:00 »
The Planck is on Massdrop! Orange milled case, 4 new wood middles, and brass plate options!
https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open

Thanks for your support everybody! Couldn't have made it this far without you :)

Hope you enjoy some of the options we have setup!

That's really cool. My only complaint is lack of tactile greys on the list (but i'm probably the weirdo there, so really not a big deal..). Trying to decide when to buy my build though, will the orange base plate ever be on your regular store?
« Last Edit: Thu, 13 August 2015, 08:11:59 by zenless »

Offline jackiecanev2

  • Posts: 73
  • Location: US
[IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #366 on: Thu, 13 August 2015, 14:56:20 »
The Planck is on Massdrop! Orange milled case, 4 new wood middles, and brass plate options!
https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open

Thanks for your support everybody! Couldn't have made it this far without you :)

Hope you enjoy some of the options we have setup!

Will there be an option to just buy brass plates, either via MD or from the OLKB store?

(Edit: or any of the other new options...)
| HHKB2 | Viper | 356.2 | Ducati | pitties | scalpels |

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #367 on: Thu, 13 August 2015, 16:07:51 »
The Planck is on Massdrop! Orange milled case, 4 new wood middles, and brass plate options!
https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open

Thanks for your support everybody! Couldn't have made it this far without you :)

Hope you enjoy some of the options we have setup!

If a large quantity of people want them assembled, do you plan on assembling them yourself?  That seems like it would be a lot of repetitive, mundane work for yourself....
Wish I had some gif or quote for this space, but I got nothing

Offline rpeterclark

  • Posts: 354
  • Location: Florida
  • RPTR ❌
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #368 on: Thu, 13 August 2015, 16:18:29 »
Wow, what an amazing response you are having at MD! Congrats! Joined! I can't wait to see the brass options.

Offline lolpes

  • Posts: 365
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #369 on: Thu, 13 August 2015, 16:21:53 »
Hey jack, is it possible to buy just one orange milled case from you? I don't want a kit from massdrop, as I already have a planck :)

Offline nathanrosspowell

  • * Destiny Supporter
  • Posts: 1543
  • Location: Montreal, QC
    • nathanrosspowell.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #370 on: Thu, 13 August 2015, 16:37:50 »
Congrats Jack and co. at OLKB!

The numbers look great. By far the most configurable keyboard they have ever had up on massdrop  :cool:

Offline mecano

  • Posts: 141
  • Location: France
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #371 on: Thu, 13 August 2015, 17:24:15 »
And milled planck cases, I missed the announcement about these!
Jack is the pbt mandatory when using the universal plate?
I was planning on hand wiring and wanted to be able to top open the switches.
On your site the last row schematic looks like you can't use the universal plate without a pcb.

Offline jackiecanev2

  • Posts: 73
  • Location: US
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #372 on: Thu, 13 August 2015, 19:14:13 »

And milled planck cases, I missed the announcement about these!
Jack is the pbt mandatory when using the universal plate?
I was planning on hand wiring and wanted to be able to top open the switches.
On your site the last row schematic looks like you can't use the universal plate without a pcb.

I think you'd have a problem mounting the bottom row switches without any lateral plate there... they'd just slide around... and if I recall correctly, Jack mentioned that the universal plate only accommodates pcb mounted stabs.
| HHKB2 | Viper | 356.2 | Ducati | pitties | scalpels |

Offline mecano

  • Posts: 141
  • Location: France
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #373 on: Fri, 14 August 2015, 08:31:57 »
Thanks for confirming this jackie,
that's what I suspected, too bad the mit/grid original plates aren't allowing switch top pulling.
I had my hand on an arduino micro (ATmega32U4) at a very interesting price (summer sales) and thought I'll use it for a planck but I'd rather be able to do easy maintenance of switches.
I may use the arduino for "midifying" motorized faders instead so the MD planck came just at the right time! :thumb:

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #374 on: Fri, 16 October 2015, 15:58:42 »
Hey guys, I have some general dumb questions here.  Jack made a custom plate for me that has an extra 3x4 cluster on the right side.  I have to hand wire that cluster and connect it to the expansion headers.  Although I'm not quite sure how to go about it.  I'm wondering if anyone else has used the expansion headers on Planck PCB and can offer some insight.

1.  Does it matter which electrical contact the diode is soldered to?  On the PCB, the diode is connected to the right contact.  I have soldered the diode to the left contact on the 3x4 cluster.  Will this be a problem in the functioning of the keyboard?

2.  There are holes for the rows on the PCB and I plan to connect my extra rows to the those row holes.  Will this work?

3.  Where do I connect the extra columns?  I was thinking I could connect them the PD1, PD2, and PD3 holes in the upper left of the PCB.  Will that work?

Here is a photo to illustrate what I'm talking about.

113947-0
« Last Edit: Fri, 16 October 2015, 16:01:52 by vivalarevolución »
Wish I had some gif or quote for this space, but I got nothing

Offline neverused

  • Posts: 572
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #375 on: Fri, 16 October 2015, 16:35:20 »
Hey guys, I have some general dumb questions here.  Jack made a custom plate for me that has an extra 3x4 cluster on the right side.  I have to hand wire that cluster and connect it to the expansion headers.  Although I'm not quite sure how to go about it.  I'm wondering if anyone else has used the expansion headers on Planck PCB and can offer some insight.

1.  Does it matter which electrical contact the diode is soldered to?  On the PCB, the diode is connected to the right contact.  I have soldered the diode to the left contact on the 3x4 cluster.  Will this be a problem in the functioning of the keyboard?

2.  There are holes for the rows on the PCB and I plan to connect my extra rows to the those row holes.  Will this work?

3.  Where do I connect the extra columns?  I was thinking I could connect them the PD1, PD2, and PD3 holes in the upper left of the PCB.  Will that work?

Here is a photo to illustrate what I'm talking about.

(Attachment Link)

That  looks about right. I don't have it handy at work, but if you Google Jack's preonic you can see how he did his expansion, you just would expand horizontally instead

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #376 on: Fri, 16 October 2015, 16:46:30 »
Thanks, I found the thread for the Preonic.  I was mostly worried about the diode location.  The reddit for the Planck seems to be a lot more active.   I don't really visit reddit, can't stand the format.
« Last Edit: Fri, 16 October 2015, 16:48:09 by vivalarevolución »
Wish I had some gif or quote for this space, but I got nothing

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #377 on: Sat, 17 October 2015, 09:27:35 »
Next question.  Now I need to modify the firmware and I'm not sure exactly sure how to do that.  I'm thinking that I need to modify the following files:  keymap.c, matrix.c, and config.h.  Anything else?

I'm pretty sure that I can figure out how to modify the keymap.c and config.h files.  But I don't have a clue about the matrix.c files.  Can anybody lend me a hand on which files to modify and how to modify the files?

Fyi, here is a photo of my small 3x4 cluster with the writing (a little ugly, I know).  Column 12=PD1, Column 13=PD2, Column 14=PD3

114040-0


And here is how I plan to modify the config.h (only changes to #define matrix_cols and #define cols): 

Code: [Select]
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CONFIG_H
#define CONFIG_H

#include "config_definitions.h"

/* USB Device descriptor parameter */
#define VENDOR_ID       0xFEED
#define PRODUCT_ID      0x6060
#define DEVICE_VER      0x0001
#define MANUFACTURER    Ortholinear Keyboards
#define PRODUCT         The Planck Keyboard
#define DESCRIPTION     A compact ortholinear keyboard

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 15

/* Planck PCB default pin-out */
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D1, D2, D3}
#define ROWS (int []){ D0, D5, B5, B6 }

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* number of backlight levels */
#define BACKLIGHT_LEVELS 3

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE    5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* key combination for command */
#define IS_COMMAND() ( \
    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

/*
 * Feature disable options
 *  These options are also useful to firmware size reduction.
 */

/* disable debug print */
#define NO_DEBUG

/* disable print */
#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

#endif
« Last Edit: Sat, 17 October 2015, 10:11:23 by vivalarevolución »
Wish I had some gif or quote for this space, but I got nothing

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #378 on: Mon, 26 October 2015, 21:58:15 »
Does nobody discuss the Planck anymore on geek hack?  Has this discussion moved elsewhere to reddit or something?  Wtf.
Wish I had some gif or quote for this space, but I got nothing

Offline nathanrosspowell

  • * Destiny Supporter
  • Posts: 1543
  • Location: Montreal, QC
    • nathanrosspowell.com
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #379 on: Mon, 26 October 2015, 22:07:48 »
Does nobody discuss the Planck anymore on geek hack?  Has this discussion moved elsewhere to reddit or something?  Wtf.

It seems to be Jacks preference, yes. See his subreddits:

A lot of cool stuff still in the pipeline!

Offline Data

  • Posts: 2606
  • Location: Orlando, FL
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #380 on: Tue, 27 October 2015, 07:11:46 »
Does nobody discuss the Planck anymore on geek hack?  Has this discussion moved elsewhere to reddit or something?  Wtf.

It seems to be Jacks preference, yes. See his subreddits:

Bummer.

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #381 on: Tue, 27 October 2015, 07:14:31 »
Thanks. Yea, I figured that was the case. I can't stand reddit, but whatever.

All I'm looking for is a little help with adjust a couple files and then, I'm good to go.
Wish I had some gif or quote for this space, but I got nothing

Offline linuxhermit

  • Posts: 41
  • Location: TN
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #382 on: Tue, 27 October 2015, 08:02:17 »
What files do you need to change? I might be able to help
87UW45FC660C EW

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #383 on: Tue, 27 October 2015, 09:29:54 »
What files do you need to change? I might be able to help

Thanks.  I discussed it a bit in post #377 above.  Seems like a quick change for some that knows what they are doing, but my coding knowledge is near zilch.

All I need to do is modify the Planck default files to work with three extra columns.
Wish I had some gif or quote for this space, but I got nothing

Offline linuxhermit

  • Posts: 41
  • Location: TN
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #384 on: Tue, 27 October 2015, 15:13:05 »
can you post your matrix.c so I can see what it looks like? it's been replaced in the current firmware.
87UW45FC660C EW

Offline vivalarevolución

  • Posts: 2146
  • Location: Naptown, Indiana, USA
  • Keep it real b/c any other way is too stressful
Re: [IC] Planck PCBs & Atomic Keyboard hand-wiring kits are now for sale!
« Reply #385 on: Tue, 27 October 2015, 16:00:38 »
can you post your matrix.c so I can see what it looks like? it's been replaced in the current firmware.

Thanks.  I haven't adjusted the matrix.c because I'm not sure exactly what to do.  It is the default matrix.c for the Planck from Github from the TMK master.  I could not seem to find it on Jack's fork of TMK.  We can discuss this through PM, if necessary.

Code: [Select]
/*
Copyright 2012 Jun Wako
Generated by planckkeyboard.com (2014 Jack Humbert)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * scan matrix
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"

#ifndef DEBOUNCE
#   define DEBOUNCE 10
#endif
static uint8_t debouncing = DEBOUNCE;

/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];

#if DIODE_DIRECTION == ROW2COL
static matrix_row_t matrix_reversed[MATRIX_COLS];
static matrix_row_t matrix_reversed_debouncing[MATRIX_COLS];
#endif

static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);

inline
uint8_t matrix_rows(void)
{
    return MATRIX_ROWS;
}

inline
uint8_t matrix_cols(void)
{
    return MATRIX_COLS;
}

void matrix_init(void)
{
    // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
    MCUCR |= (1<<JTD);
    MCUCR |= (1<<JTD);

#ifdef BACKLIGHT_ENABLE
    backlight_init_ports();
#endif

    // Turn status LED on
    DDRE |= (1<<6);
    PORTE |= (1<<6);

    // initialize row and col
    unselect_rows();
    init_cols();

    // initialize matrix state: all keys off
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
        matrix_debouncing[i] = 0;
    }
}


uint8_t matrix_scan(void)
{
#if DIODE_DIRECTION == COL2ROW
    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t cols = read_cols();
        if (matrix_debouncing[i] != cols) {
            matrix_debouncing[i] = cols;
            if (debouncing) {
                debug("bounce!: "); debug_hex(debouncing); debug("\n");
            }
            debouncing = DEBOUNCE;
        }
        unselect_rows();
    }

    if (debouncing) {
        if (--debouncing) {
            _delay_ms(1);
        } else {
            for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
                matrix[i] = matrix_debouncing[i];
            }
        }
    }
#else
    for (uint8_t i = 0; i < MATRIX_COLS; i++) {
        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t rows = read_cols();
        if (matrix_reversed_debouncing[i] != rows) {
            matrix_reversed_debouncing[i] = rows;
            if (debouncing) {
                debug("bounce!: "); debug_hex(debouncing); debug("\n");
            }
            debouncing = DEBOUNCE;
        }
        unselect_rows();
    }

    if (debouncing) {
        if (--debouncing) {
            _delay_ms(1);
        } else {
            for (uint8_t i = 0; i < MATRIX_COLS; i++) {
                matrix_reversed[i] = matrix_reversed_debouncing[i];
            }
        }
    }
    for (uint8_t y = 0; y < MATRIX_ROWS; y++) {
        matrix_row_t row = 0;
        for (uint8_t x = 0; x < MATRIX_COLS; x++) {
            row |= ((matrix_reversed[x] & (1<<y)) >> y) << x;
        }
        matrix[y] = row;
    }
#endif

    return 1;
}

bool matrix_is_modified(void)
{
    if (debouncing) return false;
    return true;
}

inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
    return (matrix[row] & ((matrix_row_t)1<col));
}

inline
matrix_row_t matrix_get_row(uint8_t row)
{
    return matrix[row];
}

void matrix_print(void)
{
    print("\nr/c 0123456789ABCDEF\n");
    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
        phex(row); print(": ");
        pbin_reverse16(matrix_get_row(row));
        print("\n");
    }
}

uint8_t matrix_key_count(void)
{
    uint8_t count = 0;
    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
        count += bitpop16(matrix[i]);
    }
    return count;
}

static void init_cols(void)
{
    int B = 0, C = 0, D = 0, E = 0, F = 0;

#if DIODE_DIRECTION == COL2ROW
    for(int x = 0; x < MATRIX_COLS; x++) {
        int col = COLS[x];
#else
    for(int x = 0; x < MATRIX_ROWS; x++) {
        int col = ROWS[x];
#endif
        if ((col & 0xF0) == 0x20) {
            B |= (1<<(col & 0x0F));
        } else if ((col & 0xF0) == 0x30) {
            C |= (1<<(col & 0x0F));
        } else if ((col & 0xF0) == 0x40) {
            D |= (1<<(col & 0x0F));
        } else if ((col & 0xF0) == 0x50) {
            E |= (1<<(col & 0x0F));
        } else if ((col & 0xF0) == 0x60) {
            F |= (1<<(col & 0x0F));
        }
    }
    DDRB &= ~(B); PORTB |= (B);
    DDRC &= ~(C); PORTC |= (C);
    DDRD &= ~(D); PORTD |= (D);
    DDRE &= ~(E); PORTE |= (E);
    DDRF &= ~(F); PORTF |= (F);
}

static matrix_row_t read_cols(void)
{
    matrix_row_t result = 0;

#if DIODE_DIRECTION == COL2ROW
    for(int x = 0; x < MATRIX_COLS; x++) {     
        int col = COLS[x];
#else
    for(int x = 0; x < MATRIX_ROWS; x++) {
        int col = ROWS[x];
#endif

        if ((col & 0xF0) == 0x20) {
            result |= (PINB&(1<<(col & 0x0F)) ? 0 : (1<<x));
        } else if ((col & 0xF0) == 0x30) {
            result |= (PINC&(1<<(col & 0x0F)) ? 0 : (1<<x));
        } else if ((col & 0xF0) == 0x40) {
            result |= (PIND&(1<<(col & 0x0F)) ? 0 : (1<<x));
        } else if ((col & 0xF0) == 0x50) {
            result |= (PINE&(1<<(col & 0x0F)) ? 0 : (1<<x));
        } else if ((col & 0xF0) == 0x60) {
            result |= (PINF&(1<<(col & 0x0F)) ? 0 : (1<<x));
        }
    }
    return result;
}

static void unselect_rows(void)
{
    int B = 0, C = 0, D = 0, E = 0, F = 0;

#if DIODE_DIRECTION == COL2ROW
    for(int x = 0; x < MATRIX_ROWS; x++) {
        int row = ROWS[x];
#else
    for(int x = 0; x < MATRIX_COLS; x++) {
        int row = COLS[x];
#endif
        if ((row & 0xF0) == 0x20) {
            B |= (1<<(row & 0x0F));
        } else if ((row & 0xF0) == 0x30) {
            C |= (1<<(row & 0x0F));
        } else if ((row & 0xF0) == 0x40) {
            D |= (1<<(row & 0x0F));
        } else if ((row & 0xF0) == 0x50) {
            E |= (1<<(row & 0x0F));
        } else if ((row & 0xF0) == 0x60) {
            F |= (1<<(row & 0x0F));
        }
    }
    DDRB &= ~(B); PORTB |= (B);
    DDRC &= ~(C); PORTC |= (C);
    DDRD &= ~(D); PORTD |= (D);
    DDRE &= ~(E); PORTE |= (E);
    DDRF &= ~(F); PORTF |= (F);
}

static void select_row(uint8_t row)
{

#if DIODE_DIRECTION == COL2ROW
    int row_pin = ROWS[row];
#else
    int row_pin = COLS[row];
#endif

    if ((row_pin & 0xF0) == 0x20) {
        DDRB  |= (1<<(row_pin & 0x0F));
        PORTB &= ~(1<<(row_pin & 0x0F));
    } else if ((row_pin & 0xF0) == 0x30) {
        DDRC  |= (1<<(row_pin & 0x0F));
        PORTC &= ~(1<<(row_pin & 0x0F));
    } else if ((row_pin & 0xF0) == 0x40) {
        DDRD  |= (1<<(row_pin & 0x0F));
        PORTD &= ~(1<<(row_pin & 0x0F));
    } else if ((row_pin & 0xF0) == 0x50) {
        DDRE  |= (1<<(row_pin & 0x0F));
        PORTE &= ~(1<<(row_pin & 0x0F));
    } else if ((row_pin & 0xF0) == 0x60) {
        DDRF  |= (1<<(row_pin & 0x0F));
        PORTF &= ~(1<<(row_pin & 0x0F));
    } 
}
Wish I had some gif or quote for this space, but I got nothing