Problem with I2C on KL27

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with I2C on KL27

767件の閲覧回数
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 返信

581件の閲覧回数
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 件の賞賛
返信