AnsweredAssumed Answered

I2c peripheral adding address byte ?

Question asked by McC.Joe on Dec 31, 2016

Using I2C peripheral on F0 micro.  When I restart the I2C bus it sends the slave address plus an extra byte then my data, after that first transmission it doesnt send the extra byte, just the after the first Restart. Problem is now my data array is off by one byte. I can not seem to be able to control the master from sending this "extra" byte.


For example ...


First I send 06,00,00 which sets the direction of the two 8 bit registers. This works as expected.
On the LA I get:
0x40 0x06 0x00 0x00 ACK   (which is what is expected)
(0x40 is slave, 0x06 is direction reg address, and the 0x00  0x00  configures the pins as output.


The next three btyes are the starting address and two data bytes 0x02, 0xff, 0x50
On the LA I get I get:
0x40 0x02 0x02 0xff ACK     (data byte 0x02 is added by the i2c peripheral)


This only happens on the first transmission after restarting, after that only my data is sent but now because of the
extra byte I am off by one byte.