Difference between revisions of "Tmk keyboard firmware"

From Makers Local 256
Jump to: navigation, search
(Documenting all the stuff I learned tonight)
 
m (more)
 
(3 intermediate revisions by one user not shown)
Line 6: Line 6:
 
* LUFA-130303 bootloader - [[File:BootloaderCDC.hex.gz]]
 
* LUFA-130303 bootloader - [[File:BootloaderCDC.hex.gz]]
 
** avrdude -p atmega32u4 -P /dev/ttyACM0 -c usbasp -U flash:w:BootloaderCDC.hex
 
** avrdude -p atmega32u4 -P /dev/ttyACM0 -c usbasp -U flash:w:BootloaderCDC.hex
* Program over the bootloader
+
* Program tmk over the bootloader
 
** avrdude -p atmega32u4 -P /dev/ttyACM0 -c usbasp -U flash:w:ps2_usb_lufa.hex
 
** avrdude -p atmega32u4 -P /dev/ttyACM0 -c usbasp -U flash:w:ps2_usb_lufa.hex
 +
 +
== ps/2 cable ==
 +
I stole a female ps/2 port from a qcat. 
 +
              o  |  o <-- Blue (clock)
 +
Red (vcc) --> o  |  o <-- Green (gnd)
 +
                o o <-- Yellow (data)
 +
 +
== Keymap macro ==
 +
#define KEYMAP( \
 +
/* these parameters indicate keyboard layout order */
 +
) { \
 +
/* you must place C array notation of your matrix structure here */
 +
}
 +
*K00-K5H of KEYMAP macro definition are not related to keycode value at all, just parameters of macro and have no meaning in practice. I just named them like K<row><col>, where row and col is comprised of 0-9A-I; G, H and I mean 16, 17 and 18.

Latest revision as of 23:04, 12 September 2015

SparkFun atmega32u4 Breakout

So, while this board uses an atmega32u4 it has a major problem. It will always boot into the bootloader and wait for the char 'e' to be sent. So instead, I just wrote the tmk firmware over the bootloader.

ps/2 cable

I stole a female ps/2 port from a qcat.

              o  |  o <-- Blue (clock)
Red (vcc) --> o  |  o <-- Green (gnd)
                o o <-- Yellow (data)

Keymap macro

#define KEYMAP( \
/* these parameters indicate keyboard layout order */
) { \
/* you must place C array notation of your matrix structure here */
}
  • K00-K5H of KEYMAP macro definition are not related to keycode value at all, just parameters of macro and have no meaning in practice. I just named them like K<row><col>, where row and col is comprised of 0-9A-I; G, H and I mean 16, 17 and 18.