robert-hh / Onewire_DS18X20

Classes for driving the DS18x20 sensor with the onewire protocol for Pycom MicroPython
11 stars 6 forks source link

Presence-Detect Low time #19

Closed MauroDiamantino closed 1 year ago

MauroDiamantino commented 1 year ago

Hi, the Presence-Detect Low time in line 47 of onewire.py, should not be 240ms rather than 420ms? I said that taking into account the DS18B20 Maxim datasheet. In page 3, it is stated that the max value for Presence-Detect Low time (tPDLOW) should be 240ms.

robert-hh commented 1 year ago

The data sheet just says that the response low pulse of the DS18B20 starts latest after 60µs and is not longer than 240µs. The code probes the bus after 60µs for being low. Then it waits for a while, and that while must be at least 240µs, but is allowed to be longer. Nothing happens in this time.