Problem with I2C on KL27

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with I2C on KL27

242 Views
juancamilomonto
Contributor I

Hi,

Im working with the KL27 and the protocol I2C to read the data of the BMT180, but when I send the dares (0xF4) it changes the MSB and sends 0x74.

I don't know which the problem is because my code is very simple.

Im using de function of SendDataPolling on KDS

Regards,

Juan Camilo Montoya

Tags (2)
0 Kudos
1 Reply

56 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Juan Montoya:

Please notice the I2C standard address is 7-bits long, so from an 8-bit address value (in this case 0xF4) the most significant bit is discarded and the value is shifted 1 position to the left to accommodate the R/W bit in the less significant bit of the first frame sent by the I2C master, such as next:

  |  ADD6  |  ADD5  |  ADD4  |  ADD3  |  ADD2  |  ADD1  |  ADD0  |  R/W  |

I think this is why you see it as 0x74. Please let me know if this is not your problem.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos