Unstable onewire

I played with the numbers as you have too (going to extremes in some cases, like you have to test them). That particular spec, Read Data Valid, is one I also had down at ‘1’ for a while (zero didn’t work, haha). And yes it improves things (because it reduces the chance of some type of interrupt coming in and messing up your data bit read)…but keeping it at ‘1’ will really ruin any chance of extending the OneWire very far or putting more devices on the same line. In fact, I think that particular spec (Read Data Valid) is the ONE timing that is key for the entire bus. It sets both the “drive 0 time” (falling edges) and the “RC timeconstant pullup time” (rising edges). I am making up terms because I don’t know the right ones. Once I realized it was some type of interrupt still getting into those data bit moves, I moved the timings back to “spec” numbers.

And, yes. I realize that ATOMIC BLOCKs and interrupts are redundant for the Photon…but I don’t know about all the other devices that use this library and didn’t want to mess those up, so I left them in there for discussion.

But…since I want the bus to be fixed, can you ask any further questions on the other thread?..I want to get more eyes on the Library thread so that it gets fixed for everybody.