1. 程式人生 > >DZ60通過IIC讀取LM75溫度遇到問題解決方法

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毫秒的等待時間