Expand description
The bus timings in microseconds, from the DS18B20 datasheet’s slot definitions.
Constants§
- PRESENCE_
SAMPLE_ US - How long after releasing the reset pulse the presence pulse is sampled. A device pulls the line low 15 to 60 us after the release and holds it 60 to 240 us, so 70 us falls inside the presence pulse of every device.
- PRESENCE_
TAIL_ US - The rest of the 480 us receive window after the presence sample.
- READ_
LOW_ US - Read: the controller starts the slot with a short low pulse of at least 1 us.
- READ_
SAMPLE_ US - Read: the line is sampled this long after release, inside the 15 us window from the start of the slot in which the device’s bit is valid.
- READ_
TAIL_ US - Read: the rest of the 60 us slot plus recovery.
- RESET_
LOW_ US - The reset pulse: the controller holds the line low at least 480 us.
- WRITE_
ONE_ HIGH_ US - Write 1: the line stays released for the rest of the slot plus recovery.
- WRITE_
ONE_ LOW_ US - Write 1: the line is pulled low briefly, within the 1 to 15 us the slot allows.
- WRITE_
ZERO_ HIGH_ US - Write 0: the recovery time before the next slot.
- WRITE_
ZERO_ LOW_ US - Write 0: the line is held low for the whole 60 to 120 us slot.