-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max bus speed? #42
Comments
I haven't tried it, there's always a chance but it might not be too reliable. If you can adjust the master clock arbitrarily see how high you can go with the 8MHz clock and then make educated guesses. |
Thanks Rambo. I will try to do some tests a different speeds. If they are interesting I will report my findings. On the other hand, I saw also that you merged a fully interrupt driven support, so no more need for pooling for star condition. It would be great if you can add tags to the versions a brief change log. This will help libray user to indentify the version used, specially using automated library managers such platformio. |
That is the maximum I2C Slave speed for Attiny85 running on 1Mhz internal oscillator? |
Hi, For the tests I have used a RPI as master that is problematic but is faster than a typical mcu. An important feedback for @rambo that was unable to make it work with the new version based on IRQ but with the old one that require polling of stop condition. I don not know why but stopcondition is not detected. Regards, |
There's a bug (or missing feature if you're nice) in the hardware and the I2C STOP condition simply does not have an interrupt vector on the ATTiny USI hardware (at least back in the revisions when I last looked at the documentation and I'd be very surprised if it got "fixed") As for @ludiazv I'm fairly sure 1MHz clock will not work except at very slow bus speeds maybe and the master definitely must support "clock stretching" (where slave holds the clock down and master MUST wait for it to come back up before driving it back down for the next bit) properly. Something which RPi I2C master for example does not do correctly. |
I use https://github.com/puuu/USIWire library for i2c slave:
I measure Attiny85: 1800seconds sleeping with watchdog is ~1830seconds. So there is a ~1.6% shift. |
There is any guideline between mcu clock and the max speed of the bus?
I've tested with internal 8Mhz clock and the device is able to act as slave in a 100kHz bus. But it fails at fast I2c (400kHz). There is any chance to solve this issue by using 12Mhz/16MHz as clock for the mcu?
Regards,
The text was updated successfully, but these errors were encountered: