Author Topic: Bluefruit EZ-key with tmk_keyboard firmware  (Read 19209 times)

0 Members and 1 Guest are viewing this topic.

Offline a-c

  • Posts: 189
  • Location: USA
Re: Bluefruit EZ-key with tmk_keyboard firmware
« Reply #50 on: Wed, 04 November 2015, 00:54:50 »
so I almost get mine keyboard working with the BlueFruit, except that the keyboard uses PD5 as one of the scan matrix pins, while in talking to the BT module I believe the pin is used as XCLK. therefore some of the keys associated with PD5 would not work...

i tried digging into the atmega32u4 data sheet a bit and it seems like for synchronous mode (USART) the XCLK pin would be used, while in asynchronous mode the pin would not be used. I checked the bits set in UCSR1C and it appears to me that UMSEL10 and UMSEL11 are not set, which means it is working in asynchronous mode. and then I get confused...

not being an expert in UART/USART communication, i would appreciate any pointer/suggestion/hint to keep PD5 being used as XCLK when talking to the BlueFruit.

many thanks in advanced!
justin

Take a look at https://github.com/tmk/tmk_keyboard/blob/master/converter/terminal_bluefruit/config.h

I used the serial port setup code from here to add bluetooth to a planck which is also using PD5 in the matrix.

Offline justinyhuang

  • Posts: 30
Re: Bluefruit EZ-key with tmk_keyboard firmware
« Reply #51 on: Wed, 04 November 2015, 14:17:13 »

Take a look at https://github.com/tmk/tmk_keyboard/blob/master/converter/terminal_bluefruit/config.h

I used the serial port setup code from here to add bluetooth to a planck which is also using PD5 in the matrix.

thank you for the pointer!
yes i agree the planck also uses PD5 in its matrix and i am also using the same port setup code in my build, interestingly the row  associated to PD5 in my build simply doesn't work...

guess i will have to dig deeper to see what actually goes wrong.

thanks again,

Offline justinyhuang

  • Posts: 30
Re: Bluefruit EZ-key with tmk_keyboard firmware
« Reply #52 on: Thu, 05 November 2015, 12:30:07 »
I've figured out what goes wrong, and just like to update the thread:

on the PCB, D3 and D5 of the controller were shorted during soldering, so when ever D3 is used, D5 gets messed. =) and D3 happens to be the TX pin for UART. :))

after some desoldering and cleaning up, now my keyboard is happily typing via BT =)

thanks for all the help!

Offline neverused

  • Posts: 571
Re: Bluefruit EZ-key with tmk_keyboard firmware
« Reply #53 on: Thu, 05 November 2015, 12:32:24 »
I've figured out what goes wrong, and just like to update the thread:

on the PCB, D3 and D5 of the controller were shorted during soldering, so when ever D3 is used, D5 gets messed. =) and D3 happens to be the TX pin for UART. :))

after some desoldering and cleaning up, now my keyboard is happily typing via BT =)

thanks for all the help!
Great work!