Wire#
A single data wire plus ground. The slave parasitically draws
power from the data line when it is idle high, so two physical
conductors carry power, ground, and signal between a master and
many slaves. iButtons, Dallas DS18B20 temperature sensors,
some door-access tokens; each slave has a unique 64-bit ROM ID
that the master uses to address it.
Wires#
Signal |
Direction |
Purpose |
|---|---|---|
|
Bidirectional |
Data and parasitic power; open-drain with a pull-up (typically 4.7 kΩ). |
|
Reference |
Ground. |
|
In |
Direct power; lets slaves skip parasitic mode. |
Wire format#
The master initiates every transaction with a reset pulse. All slaves respond with a presence pulse, then the master issues a ROM command followed by a function command.
Reset. Master pulls
DQlow for ≥ 480 µs, then releases.Presence. Slaves pull
DQlow for 60–240 µs.Write 1. Master pulls low for 1–15 µs, releases for the rest of a 60 µs slot.
Write 0. Master pulls low for 60–120 µs.
Read slot. Master pulls low for 1 µs, releases, then samples
DQwithin 15 µs of the leading edge.
Speeds are 16.3 kbps standard and 142 kbps in overdrive mode. ROM commands address one or all slaves; function commands depend on the device family.
Pads#
Label |
Meaning |
|---|---|
|
Single-wire data line. |
|
Ground. |
|
Optional direct supply. |
The 64-bit ROM ID is the operator’s interest. Family code (8 bits) + serial number (48 bits) + CRC (8 bits); some access tokens are cloned by copying the ROM ID into a writable iButton blank.
Tools#
Tool |
Effect |
|---|---|
|
1-Wire bridge ICs; USB-to-1-Wire dongles use them internally. |
|
Bit-bang 1-Wire from a Raspberry Pi GPIO; surfaces slaves
under |
|
Read and emulate iButton-style 1-Wire tokens. |
Logic analyzer ( |
Decode 1-Wire timing. |
References#
Maxim
AN937Book of iButton Standards.Linux kernel
Documentation/w1/for the in-tree drivers.I2C for the addressed two-wire alternative.