Read ROM [33h]
This command allows the bus master to read the DS18B20’s 8-bit family code, unique 48-bit serial
number, and 8-bit CRC. This command can only be used if there is a single DS18B20 on the bus. If
more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the
same time (open drain will produce a wired AND result).
This command allows the bus master to read the DS18B20’s 8-bit family code, unique 48-bit serial
number, and 8-bit CRC. This command can only be used if there is a single DS18B20 on the bus. If
more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the
same time (open drain will produce a wired AND result).
Read ROM [33h]
This command allows the bus master to read the DS18B20’s 8-bit family code, unique 48-bit serial
number, and 8-bit CRC. This command can only be used if there is a single DS18B20 on the bus. If
more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the
same time (open drain will produce a wired AND result).
使用Read ROM[33h]的话,如果没有接温度探头ds18b20,是不是读出的64位值都为0xFF啊?
number, and 8-bit CRC. This command can only be used if there is a single DS18B20 on the bus. If
more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the
same time (open drain will produce a wired AND result).
英文较差,这段不是说:仅能单颗芯片在总线上,才能这样使用;多颗会发生冲突。??
感觉这方案不可行。
看看原子的代码, 里面已经有检测的程序了, 修改完善一下应该是可以达到版主的需求.
只是有多颗在总线的话, 应该也是要再改代码...
一周热门 更多>