Closed Zitt closed 5 years ago
I captured what looks like a good write with acknowledges: https://www.flickr.com/photos/52968060@N00/39936919373/sizes/l
And the failed Reads that don't have acknowledges: https://www.flickr.com/photos/52968060@N00/39936916883/sizes/l
Suggestions?
Nevermind. RTFM. page 7 of the datasheet was clear:
The IS31FL3196A has a 7-bit slave address (A7:A1), followed by the R/W bit, A0. Since IS31FL3196A only supports write operations, A0 must always be “0”.
Doh!
Running Arduino 1.8.0 on a custom design based on ATmega32u2 using HoodLoader2 as a boot loader. Board has 32u2 configured with 16MHz external XTAL and communicates via CDC Serial. Trying to interface to two different instances of I2C IS31FL3196As … one AD tied high; the other AD tied low.
Read of the IS31FL3196As (all registers) never return values due to read after register isn't acknowledged. My Oscope seems to confirm that the Reads aren't being acknowledged. The ino returns:
I2C device didn't ACK XX read
during read attempts.Have defined the following:
with the I2C_SLOWMODE defined to facilitate early debug. Writes to the 3196As seem to pass; but without a functional read; I can't "confirm" they operate properly.
Implementation of the Read function is as follows:
which basically lifted from the readme.md doc but with added fault tolerance. Calling the above function with this example:
tbyte = i2c_ByteRead( HUB_I2C_ADR, 0x00, true, 8333, &gotError);
Are there any known issues with the current tip w/ regards to I2C reads? Any further debug you might suggest to help isolate the failure? I'm wondering if my implementation isn't release the sda line soon enough for the 3196A to acknowledge.