bitbank2 / BitBang_I2C

A software I2C implementation to run on any GPIO pins on any system
GNU General Public License v3.0
235 stars 31 forks source link

Would this be a possible route to activating "high speed mode"? #2

Open willfaulds opened 4 years ago

willfaulds commented 4 years ago

I'm specifically looking for a way to improve data transfer rates with an ADS1115 which support high speed mode but only after

No special action is required to use the ADS1113/4/5 in standard or fast mode, but high-speed mode must be activated. To activate high-speed mode, send a special address byte of 00001xxx following the START condition, where xxx are bits unique to the Hs-capable master. This byte is called the Hs master code. (Note that this is different from normal address bytes; the eighth bit does not indicate read/writestatus.) ...

I've been stabbing in the dark but had no luck so far.

https://cdn-shop.adafruit.com/datasheets/ads1115.pdf More detailed starting proceedure of high speed mode: https://www.eecs.umich.edu/courses/eecs473/Exam/handoutsEX1F17.pdf

I'm running an ESP32 so believe the speed increase could be useful

bitbank2 commented 4 years ago

It's a reasonable idea. I have an ADS1115 at home, but I'm currently traveling. When I return I can do some tests. In the mean time, most I2C devices don't regulate their speed, so you can potentially run it at > 400Khz already without having to switch to high speed mode. The ESP32 lets you set hardware I2C speed up to 800Khz and my bit bang code can run at about 1Mhz, so give it a try.