(meta: if this is answered somewhere, or this question belongs in an existing thread, apologies! I did search for a while.)
I have a green PCB teletype with a backpack with pull-up resistors, which are working as near as I can tell. I was testing my i2c bus setup by trying to use TXi and 16n values to control Just Friends volume and pitch.
I was seeing the setup fail, which I understand can be common with i2c setups, so I started stripping it down to see if I could isolate the problem. What I’m seeing is, well, odd: If I have my 16n on the bus, and I attempt to access an i2c device that Teletype can’t find, the i2c bus stops working entirely.
I’m testing this with only 16n on the bus, and a simple metro script:
M:
X FB 1
and then watching the live variable on the live edit screen. As I slide the fader, I can see X change values, reading from the fader correctly.
If I try to access something that Teletype can’t reach, i.e. I run something like JF.MODE 1 as a live command, X immediately becomes 0, and Teletype can no longer see the 16n on the bus and can no longer read the fader value.
If I do a similar thing with a TXi - only the TXi on the bus, simple polling in the metro script, then do something like attempting to access JF.MODE 1 - Teletype handles this fine. It continues to see the TXi.
Teletype also handles a more complex i2c bus setup well enough. I’ve had a TXi, a TXo, JF, and two W/ on my bus with no issues. It’s only when I add my 16n to the mix that I have issues.
This is true even if I’m not attempting to access the 16n. With TXi and 16n on the bus, and only polling the TXi, if I attempt to access something that’s not on the bus, Teletype stops seeing all the devices.
This sounds like a non-problem in some ways - just don’t call things that aren’t on your i2c bus! - but what I was finding was that even if I was running scripts that only called devices that were present on the bus, I would still get failures. I am guessing that any momentary inability to reach a device causes it to seize up.
I am mostly wondering if this smells like a particular kind of problem to anyone. I could guess
- pull up resistance problem (again I am using a backpack but maybe it’s not doing what it should?)
- i2c length issue (my cable for the 16n is a foot long; that was the shortest I could get it while having it reach the Teletype)
- hardware issue with the 16n (I DIY’d it; it otherwise functions as expected)
- Maybe this is normal expected behavior?
Stats:
Teletype: Green PCB, with backpack, running v3.2.0
16n hardware: DIY’d by me; Teensy 3.2; PCB v1.34 as far as I know; no pull up resistors installed (i.e. for 16n-as-leader)
16n software: v2.0.1
16n i2c cable: homebrew stereo TRS 3.5mm joined to jumper wires, total distance between the 16n jack and the backpack is a little under a foot
Thanks in advance for any help or suggestions for more things to test!