本帖最后由 dolin_wu 于 2010-3-2 23:03 编辑
请教一下各位:
DS18B20的告警搜索命令是怎么用的,DATESHEET上说超过限制温度后会有个标志位,那个位是什么位?是自己设置的吗??我说的设置温度限制是用TH,TL两个字节来设置温度的上下限的!!
datesheet:
OPERATION - ALARM SIGNALING
After the DS18B20 has performed a temperature conversion, the temperature value is compared to the
trigger values stored in TH and TL. Since these registers are 8-bit only, bits 9-12 are ignored for
comparison. The most significant bit of TH or TL directly corresponds to the sign bit of the 16-bit
temperature register. If the result of a temperature measurement is higher than TH or lower than TL, an
alarm flag inside the device is set. This flag is updated with every temperature measurement. As long as
the alarm flag is set, the DS18B20 will respond to the alarm search command. This allows many
DS18B20s to be connected in parallel doing simultaneous temperature measurements. If somewhere the
temperature exceeds the limits, the alarming device(s) can be identified and read immediately without
having to read non-alarming devices.
红色部分说会有一个响应,是什么意思啊??难道是和复位后ds18b20会产生一个应答一样类似的响应???各位熟悉的指导哈啊!! |