You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default 100 kHz works, and the Wire.setClock(100000L) works.
If the clock is set to 800 kHz or above, then the SCL signal stays low because of a missing stop condition.
The I2C speed for normal signals should be from 100kHz to 400kHz, but someone might try 800kHz.
Tested with Arduino IDE 1.8.15 and Nano Every board. Nothing is connected to the I2C bus.
Test sketch:
Result with a sample rate of 24 MHz with LHT00SU1 and PulseView/sigrok).
The measured frequency of SCL varies a few percentage. It is 99 kHz with no pullup resistors here:
With Wire.setClock(400000L); the measured frequency of SCL is 303 kHz with no pullup resistors:
With Wire.setClock(800000L); the SCL signal stays low. There is no stop condition. The SCL raises before the next start condition. The measured frequency of SCL is 525 kHz with no pullup resistors.
[Update] I have edited this Issue because I learned that not the clock speed of SCL is set, but that the resulting clock speed is relative to the rise time.
The text was updated successfully, but these errors were encountered:
Koepel
changed the title
Wire.setClock() keeps SCL low with 800kHz and 400kHz turns into 300kHz.
Wire.setClock() keeps SCL low with 800kHz
Aug 9, 2021
The default 100 kHz works, and the
Wire.setClock(100000L)
works.If the clock is set to 800 kHz or above, then the SCL signal stays low because of a missing stop condition.
The I2C speed for normal signals should be from 100kHz to 400kHz, but someone might try 800kHz.
Tested with Arduino IDE 1.8.15 and Nano Every board. Nothing is connected to the I2C bus.
Test sketch:
Result with a sample rate of 24 MHz with LHT00SU1 and PulseView/sigrok).
The measured frequency of SCL varies a few percentage. It is 99 kHz with no pullup resistors here:
With
Wire.setClock(400000L);
the measured frequency of SCL is 303 kHz with no pullup resistors:With
Wire.setClock(800000L);
the SCL signal stays low. There is no stop condition. The SCL raises before the next start condition. The measured frequency of SCL is 525 kHz with no pullup resistors.[Update] I have edited this Issue because I learned that not the clock speed of SCL is set, but that the resulting clock speed is relative to the rise time.
The text was updated successfully, but these errors were encountered: