Don't do that stupid test then. It only tests whether the matrix supports both shift keys + one extra and is not a conclusive test for xKRO. And most of all, it is highly synthetic: it is not often that you press both Shift keys.fossala wrote:Just to let people know. If you hold both shifts and try to type "the quick brown fox....." the controller seems to crash and I have to unplug it then put it back in.
Hardware dvorak HHKB.
-
- Location: Belgium, land of Liberty Wafles and Freedom Fries
- Main keyboard: G80-3K with Clears
- Favorite switch: Capacitative BS
- DT Pro Member: 0049
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Soarer wrote:The only code changes needed to make it work on the non++ Teensy were in hhkb/matrix.c, to use PF0 and PF1 instead of PE6 and PE7. And of course changing the MCU definition in hhkb/Makefile.pjrc to atmega32u4. Any pins could be used, but those worked out nicely for the wiring.
I was asked in a PM for more detail about the code changes I made for the non++ Teensy, so here they are! These defines match the wiring diagram I posted. It looks a lot more than it really is because this is a single chunk to paste over the existing defines. Just match the first and last lines of the chunk in hhkb/matrix.c...
Code: Select all
#ifdef HOST_PJRC
#if defined(__AVR_AT90USB1286__)
// Ports for Teensy++ 2.0
// row: PB0-2
// col: PB3-5,6
// key: PE6(pull-uped)
// prev: PE7
#define KEY_INIT() do { \
DDRB |= 0x7F; \
DDRE |= (1<<7); \
DDRE &= ~(1<<6); \
PORTE |= (1<<6); \
} while (0)
#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \
(((COL) & 0x07)<<3) | \
((ROW) & 0x07))
#define KEY_ENABLE() (PORTB &= ~(1<<6))
#define KEY_UNABLE() (PORTB |= (1<<6))
#define KEY_STATE() (PINE & (1<<6))
#define KEY_PREV_ON() (PORTE |= (1<<7))
#define KEY_PREV_OFF() (PORTE &= ~(1<<7))
#define KEY_POWER_ON()
#define KEY_POWER_OFF()
#else
// Ports for Teensy 2.0
// row: PB0-2
// col: PB3-5,6
// key: PF0(pull-uped)
// prev: PF1
#define KEY_INIT() do { \
DDRB |= 0x7F; \
DDRF |= (1<<1); \
DDRF &= ~(1<<0); \
PORTF |= (1<<0); \
} while (0)
#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \
(((COL) & 0x07)<<3) | \
((ROW) & 0x07))
#define KEY_ENABLE() (PORTB &= ~(1<<6))
#define KEY_UNABLE() (PORTB |= (1<<6))
#define KEY_STATE() (PINF & (1<<0))
#define KEY_PREV_ON() (PORTF |= (1<<1))
#define KEY_PREV_OFF() (PORTF &= ~(1<<1))
#define KEY_POWER_ON()
#define KEY_POWER_OFF()
#endif // MCU
#else
// Ports for V-USB
Code: Select all
#MCU = at90usb162 # Teensy 1.0
MCU = atmega32u4 # Teensy 2.0
#MCU = at90usb646 # Teensy++ 1.0
#MCU = at90usb1286 # Teensy++ 2.0
This improved wiring diagram now includes the connector. It is from my memory and notes... I will not accept responsibility for any mistakes!!
Please double and triple check, because wiring it backwards would probably be fatal for your precious!!
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Oops! Looks like hasu has changed that part of his code since I did fossala's!
In the latest code, try inserting this block instead, just before the line #elif defined(__AVR_ATmega328P__) in matrix.c.
In the latest code, try inserting this block instead, just before the line #elif defined(__AVR_ATmega328P__) in matrix.c.
Code: Select all
#elif defined(__AVR_ATmega32U4__)
// Ports for Teensy 2.0
// row: PB0-2
// col: PB3-5,6
// key: PF0(pull-uped)
// prev: PF1
#define KEY_INIT() do { \
DDRB |= 0x7F; \
DDRF |= (1<<1); \
DDRF &= ~(1<<0); \
PORTF |= (1<<0); \
} while (0)
#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \
(((COL) & 0x07)<<3) | \
((ROW) & 0x07))
#define KEY_ENABLE() (PORTB &= ~(1<<6))
#define KEY_UNABLE() (PORTB |= (1<<6))
#define KEY_STATE() (PINF & (1<<0))
#define KEY_PREV_ON() (PORTF |= (1<<1))
#define KEY_PREV_OFF() (PORTF &= ~(1<<1))
#define KEY_POWER_ON()
#define KEY_POWER_OFF()
-
- Location: London, UK
- Main keyboard: G80-3000
- Favorite switch: Cherry MX blue
- DT Pro Member: -
Just replicated this mod last night. To my incredible surprise it worked first time - I thought that my not-yet-that-proficient soldering skills would let me down. A very big thanks to Soarer for the excellent instructions and the Teensy++ to Teensy mod, Fossala for the write-up and Hasu for the original code etc. Much respect to Soarer - soldering the wires to the header and still leaving enough room for the heatshrink tubing is quite tricky - good job! If I can add my little contribution to the knowledge base. Should be filed in the 'Difference between a pro and a dumb-ass' section:
1/ Definitely get a decent soldering iron. I am currently using a 12 W model that I bought from Argos years ago. I can only get needle-nosed tips which in itself is not a big issue but the iron has problems heating the end of the tip meaning that I had to continually apply heat from a spot about 3mm from the end. Absolute pain.
2/ Did this late last night and while I did double-check the pin-mappings, I did not double check the direction of the wires going into the Teensy. Managed to solder everything down before I realised the orientation of the header connection and the Teensy. Everything matched the excellent pin-out that Soarer documented but I had the wires going into the top of the Teensy which meant I had to twist the wires 180deg to get the USB connector to match the hole in the case and header connection from the keyboard.
Thanks again everyone.
1/ Definitely get a decent soldering iron. I am currently using a 12 W model that I bought from Argos years ago. I can only get needle-nosed tips which in itself is not a big issue but the iron has problems heating the end of the tip meaning that I had to continually apply heat from a spot about 3mm from the end. Absolute pain.
2/ Did this late last night and while I did double-check the pin-mappings, I did not double check the direction of the wires going into the Teensy. Managed to solder everything down before I realised the orientation of the header connection and the Teensy. Everything matched the excellent pin-out that Soarer documented but I had the wires going into the top of the Teensy which meant I had to twist the wires 180deg to get the USB connector to match the hole in the case and header connection from the keyboard.
Thanks again everyone.
-
- Location: London, UK
- Main keyboard: G80-3000
- Favorite switch: Cherry MX blue
- DT Pro Member: -
Works just as any normal USB keyboard would. On my Mac when I first plugged it in I got a wizard that asked me to press some keys on the keyboard (just follow the on-screen prompts). After that it just configured itself as a US keyboard. Works great.
- uberben
- Location: Canada
- Main keyboard: Modified Kinesis Essential
- Main mouse: Logitech M570
- DT Pro Member: -
I'm currently working on a bluetooth mod for my Kinesis right now based on hasu's firmware. If all goes well and there is the interest, I'm thinkig of making a dev board like the teensy that has built in bluetooth and li-po charger, as well as mounting holes.megnin wrote:An HHKB with embedded numpad... that's almost the perfect keyboard.
If I could get mine modded into a dual Bluetooth/corded with embedded numpad I'd carry it with me everywhere I went.
- Jim66
- Location: Bristol, UK
- Main keyboard: MacBook Pro
- Favorite switch: Topre
- DT Pro Member: -
That does sounds pretty awesome.uberben wrote:I'm currently working on a bluetooth mod for my Kinesis right now based on hasu's firmware. If all goes well and there is the interest, I'm thinkig of making a dev board like the teensy that has built in bluetooth and li-po charger, as well as mounting holes.megnin wrote:An HHKB with embedded numpad... that's almost the perfect keyboard.
If I could get mine modded into a dual Bluetooth/corded with embedded numpad I'd carry it with me everywhere I went.
-
- Main keyboard: HHKB Pro
- Main mouse: Logitech MX Anywhere
- Favorite switch: Topre
- DT Pro Member: -
That would be the perfect solution. I would get the dev board in a heartbeat.uberben wrote:I'm currently working on a bluetooth mod for my Kinesis right now based on hasu's firmware. If all goes well and there is the interest, I'm thinkig of making a dev board like the teensy that has built in bluetooth and li-po charger, as well as mounting holes.
-
- Main keyboard: HHKB Pro
- Main mouse: Logitech MX Anywhere
- Favorite switch: Topre
- DT Pro Member: -
I have successfully built the project, and I am very happy with it. Many thanks to hasu, soarer and fossala for the code and the write-ups.
The fact that I can jump to the bootloader by pressing SHIFT+SHIFT+PAUSE is nice, I am constantly modifying keymaps at the moment, and having to open the enclosure every time would be maddening. My one remaining doubt now is how I can get access to the console mode. Can anyone shed some light on this?
The fact that I can jump to the bootloader by pressing SHIFT+SHIFT+PAUSE is nice, I am constantly modifying keymaps at the moment, and having to open the enclosure every time would be maddening. My one remaining doubt now is how I can get access to the console mode. Can anyone shed some light on this?
- uberben
- Location: Canada
- Main keyboard: Modified Kinesis Essential
- Main mouse: Logitech M570
- DT Pro Member: -
I have not yet used the console mode, but as I understand it, you need to connect a USB-serial adapter to the serial port of your microcontroller. One of the many things I want to do is use the USB-serial endpoint of the ATmega32U4 so a second USB connection isn't needed. Hopefully I can get around to that soon (and it doesn't require too much work).HelgeG wrote:My one remaining doubt now is how I can get access to the console mode. Can anyone shed some light on this?
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
To get access to console you need to use PJRC's hid_listen utility. http://www.pjrc.com/teensy/hid_listen.html
Debug console uses PJRC specific protocol and utility, you need no extra hardware, just use hid_listen.
To get help message press LShift+RShift+?orH.
uberben, interesting. USB-serial(CDC) may be better option because its protocol has open specific and we can use existing tools for serial.
Debug console uses PJRC specific protocol and utility, you need no extra hardware, just use hid_listen.
To get help message press LShift+RShift+?orH.
uberben, interesting. USB-serial(CDC) may be better option because its protocol has open specific and we can use existing tools for serial.
-
- Main keyboard: HHKB Pro
- Main mouse: Logitech MX Anywhere
- Favorite switch: Topre
- DT Pro Member: -
If anyone is interested, I did a little write up on how my HHKB firmware project went. I am incredibly grateful to hasu, Soarer and fossala for the work they did, without which my own project would not have been possible.
-
- Main keyboard: HHKB Pro
- Main mouse: Logitech MX Anywhere
- Favorite switch: Topre
- DT Pro Member: -
Thanks, I am glad you liked it. The one thing that bothers me about the HHKB is the clunky access to arrow keys, where the hand has to leave the home row to get to them. Having arrow keys (and other functions) available without having to take my hands off the home row is alone a sufficient reason to use your firmware code!hasu wrote:Nice write up! I'm overwhelmed by your Fn key on F and J
-
- Main keyboard: HHKB Pro
- Main mouse: Logitech MX Anywhere
- Favorite switch: Topre
- DT Pro Member: -
I have just updated my fork to use the latest functionality available in the firmware code, and I am very happy. The firmware can now do everything I wanted to. I did a small post about my update: http://grumpylemming.com/blog/2013/10/0 ... revisited/