ESP I2C Problem with ATTiny #8078
ind03
started this conversation in
Show and tell
Replies: 1 comment
-
@ind03 why not create a pull request with this change? You've obviously done some work and debugging to figure it out, and the PR would get you listed in the git logs for posterity... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I found a problem with the Core_esp8266_si2x.cpp file.
At the end of bool Twi::write_start(void) is SDA pulled down. Next the SCL is pulled down and SDA is pulled HIGH, but this happens very close together, too close for a slow ATTiny.
This caused the standard ATTiny library (which worked fine with Nano) to not properly recognize the START condition.
I fixed it with simply adding
SCL_LOW (twi_scl);
busywait (twi_dcount>>2);
at the end of bool Twi::write_start(void).
This will prepare the bus for the data bits and gives the tiny a chance.
Beta Was this translation helpful? Give feedback.
All reactions