i try to get a CPU ( ESP8266 ) in I2C Slave mode.
my thinking for Slave mode is, that SDA and SCL must be an Input, where SDA can be a output by send Data / ACK
so my thinking is, to setup SDA and SCL as "open-drain" in init procedure and set is as input.
because SDA, SCL is pulled up the level would be high and do not block the I2C bus.
if Master waiting for a ACK ( SDA is open-drain ) the SLAVE do a ACK by sending a ACK, if the SDA would going to a output with high output (1) and this sets (Masters) SDA HIGH in the 9th time slot and Master know, data bytes send are ACK / Address matched.
EDIT AFAIK ..( ash on my main ) forget the second way..
if Master waiting for an ACK ( SDA is open-drain ) the SLAVE do an ACK by sending an ACK, if the SDA would going to an output with low output (0) and this sets (Masters) SDA in the 9th time slot and Master know, data bytes send are ACK / Address matched. After this the Slave toogle SDA back to "open-drain" input ?
is this the right thinking?
thank you
best wishes
rudi
