DZ60通過IIC讀取LM75溫度遇到問題解決方法


通過FreeScale單片機DZ60讀取LM75的溫度,遇到如下問題:

連接BDM仿真器通過IIC讀取LM溫度時不存在問題,同樣的程序,拔了仿真器,通過CAN將溫度發送出來時,讀取不到溫度。CAN通信沒有問題。

解決方法:

讀取溫度的頻率降低(<300ms),則正常。

原因分析:

The conversion-time specification is provided to indicate how often the temperature data is updated. The LM75 can be accessed at any
time and reading the Temperature Register will yield result from the last temperature conversion. When the LM75 is accessed, the
conversion that is in process will be interrupted and it will be restarted after the end of the communication. Accessing the LM75
continuously without waiting at least one conversion time between communications will prevent the device from updating the
Temperature Register with a new temperature conversion result. Consequently, the LM75 should not be accessed continuously with a
wait time of less than 300 ms

轉換時間規范提供說明通常溫度數據更新。LM75可以在任何時間和讀取溫度寄存器將從去年的溫度轉換結果。
當LM75訪問,轉換,是過程將被中斷,它將通信結束后重新啟動。訪問LM75連續無等待至少一個轉換時間之
間的交流將阻止裝置與一個新的溫度轉換的結果更新溫度寄存器。因此,不應該訪問的LM75持續不到300毫秒的等待時間



注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2021 ITdaan.com