I2C pull-up resistors

Eric. You are a genius. Just the kind of thing I wanted to see as it looks like I can easily to the two reads I want to do from the register before I issue the stop with that code. Back to the drawing board…

You’re welcome, hope your get some results now.

Ballistic, I actually don’t think what you’ve written in the previous posts clearly articulate what you’re wanting to achieve. You started by talking about adding pull up resistors and moved into code pretty quickly, so taking a few lines to clear that up wouldn’t be a bad thing.

So after reading the data sheet, my first question is: what have you done with the SA0 pin? Tied high? Tied low? That can change your address…

Next Q: VDDIO, you’ve tied it high, right?

Another thing you should do that many code samples do not is check the return value of the I2C.Execute(), if it’s zero then the transaction failed. Debug statement to make sure you’re not failing that. If you’re not able to do a single write transaction, then you’re not talking to the I2C device (could be wiring, could be defective I2C device etc.)