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