Problem with I2C on KL27

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem with I2C on KL27

819 次查看
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

标记 (2)
0 项奖励
回复
1 回复

633 次查看
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 项奖励
回复