Author Topic: JD40 Mk.II and JD45 Programming Guide  (Read 14441 times)

0 Members and 1 Guest are viewing this topic.

Offline jdcarpe

  • * Curator
  • Thread Starter
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
JD40 Mk.II and JD45 Programming Guide
« on: Sun, 24 July 2016, 12:42:50 »
With the recent release of the JD40 Mk.II and JD45 keyboards, I thought this would be a good place to put the default firmware images, as well as a programming guide, for reference.


JD40 Mk.II Default Programming Reference


JD45 Default Programming Reference


F-keys follow their corresponding number row keys, using the Fn2 layer, e.g. F1 = Fn2+V. F10 = Fn2 + U, F11 = Fn2+I, F12 = Fn2 + O.
« Last Edit: Sun, 24 July 2016, 12:46:50 by jdcarpe »
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline jdcarpe

  • * Curator
  • Thread Starter
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #1 on: Sun, 24 July 2016, 12:43:01 »
PROGRAMMING GUIDE
(for Windows)

Step 1: Download Python and install.

Step 2: Download Atmel FLIP and install.

Step 3: Download metalliqaz' excellent Easy AVR USB Keyboard Firmware and Keymapper, with the additions for the JD40 Mk.II by MajorKoos. For the JD40 Mk.II, you'll definitely want the Python version, not the compiled Windows executable. I've attached the ZIP archive to this post. If you don't need the code for the JD40, you can use either the attached Python version, or the compiled Windows installer, available here.

Step 4: Start Easy AVR by executing the run.bat script. Select File>New Default Layout..., and select either JD40 MkII (Carpe Keyboards) or JD45 (Carpe Keyboards), depending on which keyboard you have. Alternately, you can use my saved default layouts, attached to this post, by choosing File>Open Saved Layout...

Step 5: Modify the keymap to suit your preferences.

Step 6: Save your new layout by choosing File>Save Layout As...

Step 7: Build the firmware .hex file by choosing File>Build Firmware...

Step 8: Open the Atmel FLIP application you installed previously

Step 9: Connect the keyboard to your PC via USB. Windows should install the drivers automatically.

Step 10: Press the small button switch on the back of the PCB (accessible via the hole in the case) to jump into bootloader mode. At this point, Windows may or may not install the correct drivers for the device.

Step 10a: If necessary, manually install the driver for the bootloader from C:\Program Files (x86)\Atmel\Flip 3.4.7\usb (or wherever you installed FLIP. Open Device Manager, double click on the device, and select the Driver tab. Click Update Driver, and point it at the 'usb' folder mentioned above.

Step 11: In FLIP, select File>Load Hex File... and select the firmware you just built with Easy AVR.

Step 12: Click the IC icon, and select ATmega32U4. Click OK.

Step 13: Click the USB icon, and select USB. In the USB Port Connection window, click Open. If an error occurs, the correct driver is not installed. See Step 10a.

Step 14: Click the Run button on the bottom left. The software should now erase the flash on your chip, program the new firmware to flash, and verify the programming.

Step 15: Disconnect the keyboard from the PC.

Step 16: Connect your keyboard via USB again, and verify that the new firmware programming is correct. I recommend the useful Aqua's Key Test application (attached) for this.
« Last Edit: Mon, 25 July 2016, 16:14:27 by jdcarpe »
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline fluxrez

  • Posts: 107
  • Location: Sacramento, CA
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #2 on: Mon, 25 July 2016, 11:07:43 »
Thank you JD.  However, I am curious why you said to get the Python version over the Windows executable?  What are the advantages.  I already installed and used the Windows executable version.

Is that for people who want to go beyond the Easy Keymapper program?

Offline CPTBadAss

  • Woke up like this
  • Posts: 14364
    • Tactile Zine
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #3 on: Mon, 25 July 2016, 11:13:36 »
Oh that programming guide will be a nice go-to for how to program your custom keyboards in general. Thanks for sharing!

Offline jdcarpe

  • * Curator
  • Thread Starter
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #4 on: Mon, 25 July 2016, 11:48:22 »
Thank you JD.  However, I am curious why you said to get the Python version over the Windows executable?  What are the advantages.  I already installed and used the Windows executable version.

Is that for people who want to go beyond the Easy Keymapper program?

It's because with the Python version, you can include the code that MajorKoos added, for compatibility with the JD40 Mk.II keyboard. If you're just using it for the JD45, it's no problem to use the Windows executable.

I'll probably edit the guide to include that information.


Oh that programming guide will be a nice go-to for how to program your custom keyboards in general. Thanks for sharing!

Thanks, brother!
« Last Edit: Mon, 25 July 2016, 11:50:04 by jdcarpe »
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline chuckdee

  • * Destiny Supporter
  • Posts: 1308
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #5 on: Mon, 25 July 2016, 14:51:57 »
Thanks!  Nice and concise!

Offline iamtootallforthis

  • Something a lot Funnier
  • * Global Moderator
  • Posts: 4739
  • Location: West Palm Beach, FL
  • I like green stuffs.
    • WTB/WTTF Thread
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #6 on: Mon, 25 July 2016, 14:53:20 »
Using my JD45 now!

Offline jdcarpe

  • * Curator
  • Thread Starter
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #7 on: Mon, 25 July 2016, 16:41:27 »
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline ipreferpie

  • Posts: 150
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #8 on: Mon, 01 August 2016, 21:12:13 »
Help! I'm not sure it I bricked my JD45 (blocked version) :( After following the instructions and flashing, the FLIP app said the verification was ok. However, upon reconnecting, it no longer registers any keypress. I reflashed to the default you provided but still nothing. Is the a way to troubleshoot/fix this? I've attached the files below.

Offline MajorKoos

  • Posts: 851
  • Location: Bay Area
  • 1 life please. Extra large.
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #9 on: Wed, 24 August 2016, 22:38:01 »
I finally got round to porting the JD40 MKII PCB to QMK and adding some RGB action :)
I've included a compiled version for those who just want to flash via flip

https://github.com/MajorKoos/qmk_firmware/tree/master/keyboards/jd40
« Last Edit: Wed, 24 August 2016, 22:40:04 by MajorKoos »

Offline Moistgun

  • Slippery When Wet
  • * Esteemed Elder
  • Posts: 1832
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #10 on: Wed, 24 August 2016, 22:40:30 »
I finally got round to porting the JD40 MKII PCB to QMK and adding some RGB action :)
I've included a compiled version for those who just want to flash via flip

https://github.com/MajorKoos/qmk_firmware/tree/master/keyboards/jd40

Thats not just something you get around to.

Kudos for knocking this out!

Offline lolpes

  • Posts: 384
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #11 on: Sat, 04 March 2017, 06:08:02 »
Help! I'm not sure it I bricked my JD45 (blocked version) :( After following the instructions and flashing, the FLIP app said the verification was ok. However, upon reconnecting, it no longer registers any keypress. I reflashed to the default you provided but still nothing. Is the a way to troubleshoot/fix this? I've attached the files below.

I've had this same problem, did you ever get around to fix it? Is there a troubleshooting section related to the jd45, or do I pm jdcarpe?


Offline lolpes

  • Posts: 384
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #12 on: Sat, 04 March 2017, 14:39:25 »
Solved...Don't know exactly how but it is, i just tried doing the steps on Flip one at the time and it worked, aparently it erased the hex in the JD45 but didnt upload the new one for some reason. God that was scary!

Offline Hokabuki

  • Posts: 169
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #13 on: Thu, 04 May 2017, 00:35:29 »
I just loaded up my layout for my JD40 and everything seems to be working. However, I can't figure out how to get the single white LED on the back to turn off. I'm sure it's something simple. Can someone help me out?

Edit: I figured it out. There's and option under View, LED configuration, and then change "Underside" to "unassigned". I did run into some issues with FLIP not flashing to the new firmware and leaving my board temporarily bricked. It seemed to me that my computer was stuck loading it as an Atmel device instead of a keyboard. I just unplugged it and plugged it back in until my computer recognized it as a keyboard again.
« Last Edit: Thu, 04 May 2017, 23:52:57 by Hokabuki »

Offline Photoelectric

  • * Administrator
  • Posts: 6766
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #14 on: Sun, 14 May 2017, 12:04:59 »
Does anyone know whether there's an indicator LED function on JD40 II PCB?  Such as Caps Lock PCB option?  I have assembled 4 SmallFry GB kits, which use the JD40 II PCB, and so far it looks like the stock firmware just turns all soldered in LEDs on.
- Keyboards: LZ-GH (Jailhouse Blues)M65-a, MIRA SE, E8-V1, MOON TKL, CA66
- Keyboard Case Painting Tips -
- Join Mechanical Keyboards photography group on Flickr -

Offline salasource

  • Posts: 40
  • Location: Estonia
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #15 on: Mon, 05 June 2017, 08:56:26 »
Does anyone know whether there's an indicator LED function on JD40 II PCB?  Such as Caps Lock PCB option?  I have assembled 4 SmallFry GB kits, which use the JD40 II PCB, and so far it looks like the stock firmware just turns all soldered in LEDs on.
At least JD45 has status led soldered on the back side of pcb as L1. It's connected to E6. Backlight is B7 and is separately controllable. I believe that JD40 should be the same.

On QMK you can turn status led on with following example:
Code: [Select]
void matrix_init_kb(void) {
       DDRE |= (1<<6);
       PORTE |= (1<<6);
 
       matrix_init_user();
}
« Last Edit: Mon, 05 June 2017, 09:01:49 by salasource »

Offline Zobeid Zuma

  • Posts: 262
  • Location: Texas
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #16 on: Sun, 17 September 2017, 08:49:52 »
Just reprogrammed my JD45 yesterday to work nicely on my Mac Pro, with one exception.  I couldn't figure out how to get the Eject key, the one the Mac uses to open the drive tray.  This is what Xev spits out when I hit the Eject key on an Apple Matias keyboard. . .

Code: [Select]
keycode 169 (keysym 0x1008ff2c, XF86Eject)
Can anyone offer suggestions?


« Last Edit: Sun, 17 September 2017, 08:53:09 by Zobeid Zuma »

Offline salasource

  • Posts: 40
  • Location: Estonia
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #17 on: Thu, 28 December 2017, 09:01:49 »
Just reprogrammed my JD45 yesterday to work nicely on my Mac Pro, with one exception.  I couldn't figure out how to get the Eject key, the one the Mac uses to open the drive tray.  This is what Xev spits out when I hit the Eject key on an Apple Matias keyboard. . .

Code: [Select]
keycode 169 (keysym 0x1008ff2c, XF86Eject)
Can anyone offer suggestions?
Old post but in QMK (and probably also in TMK) there is KC_MEDIA_EJECT code for that.

Offline Photoelectric

  • * Administrator
  • Posts: 6766
Re: JD40 Mk.II and JD45 Programming Guide
« Reply #18 on: Sun, 29 July 2018, 13:58:22 »
Cross-posting from Smallfry 40% group buy thread:

https://geekhack.org/index.php?topic=59203.msg2644118#msg2644118

Just FYI for anyone reprogramming their Smallfry kit with JD40 Mark II PCB - Metalliqaz's EasyAVR software works great, and you're able to control in-switch LEDs:

Link to Easy AVR USB Keyboard Firmware and Keymapper

In the main Layout section in any layer, you can assign a key to :

BL Enable : turns in-switch LEDs on/off
BL Dimmer : 5 brightness levels for all in-switch LEDs
BL Mode : not very useful, but a couple of breathing modes

(To find these options, please read through the thread above, but the TLDR is to click on a key slot on the layout map, in the new box that opens up click on Key Assignment -> Scancode -> ... button, find BackLight functions in the bottom right section of the full possible function layout).

If you're too lazy to do this and want a premade .hex file, here's a version for you:

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