2WIRE mode read difference between 'r' and '.'

In 2WIRE mode, I’m using “{r}” and “{.}”. With “{r}”, the SDA pin drive is off and reads 8 bits from target device (8 SCL ticks to target device occurs at same time). With “{.}”, a bit is read from target device, but the SDA drive is still on (high or low) from a previous state. If you use ‘.’ to read the SDA bit, should the SDA pin drive be off?

If the 2WIRE mode in BP is designed the way it is, how do I go about reading a bit from target device without the SDA channel on BP from driving?

. reads the state of the data pin, I don’t think it changes the clock or data pin. If you want a clock and then read the pin you could use ^. or /.. If you want to change the SDA pin from output/low to input/high, then use the / command to release it, because 2wire is an open drain/open collector bus.

1 Like

Ahh ok, I forgot about open-drain/collector for 2WIRE. Thanks!

2 Likes

Thanks for the update, glad you got it!

1 Like