Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Teensy 2.0 i2c communication with QMK

  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    4

    Teensy 2.0 i2c communication with QMK

    Hi, hope that it's OK to ask this question here.

    I've built a split mechanical keyboard and I wanted to use 2 Teensy 2.0 for the "drivers". I wanted to use QMK for the firmware. It's working correctly except for the i2c communication. I've tried a ton of things but can't get the communication to work between the two boards.

    I'm pretty sure I've correctly hooked up the two boards, because I've tried using this sample code and it worked perfectly. So it must be something that QMK does that isn't compatible with the Teensy 2.0.

    What I do know doesn't work is the code that QMK uses to guess which side has the USB connected to doesn't work, so I've overrided it to fix it, but there might be something else, but not sure what.

    The code for the i2c communication of QMK can be found here and it's used here.

    Can someone help me at least send me in the right direction to debug this ? Thanks a lot.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,243
    Can't help much with QMK. That code looks like it ought to work on any AVR chip with I2C (TWI) hardware.

    Maybe buy or borrow (if you know anyone who has) one of those Saleae logic analyzers (or cheap clones of the older models). Connect the analyzer to SDA & SCL and maybe run the known-good Arduino code first, so you can practice capturing correct communication and learn how to turn on Saleae's I2C protocol decoder.

    Then use it to watch what's actually happening between the 2 boards when to run QMK.

    Or maybe try running Arduino code on the master side and QMK on the slave side, or vise-versa, to get some idea whether the QMK problem is on the master side, or slave side, or both. Hopefully seeing what's actually happening on the wires, particularly whether the master tries to send the address and whether the slave acks, might help narrow down where to look for the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •