PECMAC i2c response doesn't match documentation

Hi all,

First time NCD user here. I’ve got this piece with a particle:

I am attempting to issue “Command 2: Read Device Identification Data” as per the documentation. I believe I am successfully sending and even receiving replies correctly, but the reply from the device doesn’t match what the documentation says to expect. My program outputs the below. Code is attached - and is really just a modified version of the i2c discovery program

----- Start TX -----
TX[0] : 42
TX[1] : 146
TX[2] : 106
TX[3] : 2
TX[4] : 0
TX[5] : 0
TX[6] : 0
TX[7] : 0
TX[8] : 254
----- End TX -----
TX Success!
----- Start RX -----
RX[0]: 0
RX[1]: 0
RX[2]: 0
RX[3]: 255
RX[4]: 255
RX[5]: 255
RX[6]: 255
----- End RX -----

Code attached here.
i2c.ino (3.5 KB)

Hi all the commands look correct assuming the address jumpers on your board are set to target address 42.

One thing I noticed though is the Wire.setSpeed() call. The current monitor boards don’t support a clock speed over 100KHz so this may be the issue.

Hi Jacob,

Thanks for the help. I tried both commenting out the setSpeed line and setting it to 100000 (100khz, default) and same result.

Well that’s the only thing that stuck out to me. Can you try the sample code over at: https://github.com/ControlEverythingCommunity/PECMAC/blob/master/Particle/PECMAC125A.ino and see if that’s working?