Hmm. It will be different as the TXi communicates over the i2c bus.
I have a similar architecture as the TT in some regard as that there is one thread that reads the inputs and prepares the output and a second thread that responds to i2c commands. As this is literally the only thing the Teensy is doing, I read as fast as possible and store the value.1 When an i2c read comes in, it identifies the value that is requested and returns it immediately (no read or conversion needs to be performed). This was done in order to keep the execution time of the read as fast as possible … which, as i2c reads are inline on the TT, will help keep the TT’s timing as tight as possible.
I’ll run the script when I get home tonight and report back. You have me very curious.
Funny you all would be talking about input resolution. I published a firmware update yesterday that I’d been fiddling with for the last several days working to increase the responsiveness and accuracy of the read operations by adjusting the analog smoothing algorithm. You can learn more on my update post here:
1 In looking at the read code, it looks like I have it set to 500 microseconds - or half a millisecond. That seems very fast. Clearly it isn’t overflowing as I have run TXi tests for days, but I think that I want to validate that it really is doing 8 analog reads, smoothing, mapping/scaling, and quantization that quickly.
Yikes. Does it actually crash? There was a tremendous amount of work that @tehn, @sam, and @scanner_darkly (among many others) did to increase performance and stability of the i2c communications on the Teletype.
I’ve pounded the heck out of it and have found it to be super-stable.
I have found that with four or more devices on an bus without a powered adapter you will get hangs on reads very consistently and, less frequently, writes as well (especially at high speed). Honestly, three devices is pushing it.
You need one of these, my friend:
It is SMD with some pretty tiny resistors, but a pretty easy DIY project if you are into giving it a try.