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毫秒的等待时间


你可能感兴趣的:(FreeScale单片机编程)