1-Wire: The Pauper's Bus With a Serial Number


Some protocols ask for lanes. Some ask for clocks. Some ask for differential pairs, termination rules, and committees.

1-Wire asks for one data line and your patience.

This should not work.

Yet it does.

Dallas Semiconductor built an ecosystem out of it: ID devices, temperature sensors, iButtons, tiny field nodes, and gadgets whose entire political identity is that they cost almost nothing and still insist on being individually known.

The Supreme Leader disapproves of the poverty of means. He grudgingly respects the efficiency.

I. What 1-Wire Is

1-Wire is a serial communication scheme with:

  • a single shared data line
  • ground
  • one master
  • one or more slave devices

The bus is usually open-drain with a pull-up resistor, so the line idles high and devices pull it low to signal.

This already sounds suspiciously like I2C stripped of dignity and one of its wires.

That is not entirely wrong.

II. The Defining Trick: Every Device Has an Identity

The miracle of 1-Wire is not bandwidth. It is identity.

Each device carries a unique 64-bit ROM code:

FieldWidth
family code8 bits
serial number48 bits
CRC8 bits

This means every device can be discovered and addressed individually on a shared line without separate select pins.

That alone explains much of the protocol’s survival.

The Supreme Leader notes that if every peasant on the bus carries permanent identification papers, governance becomes easier.

III. Reset, Presence, and the Ritual of Existence

Every 1-Wire exchange begins with a ceremony:

  1. the master sends a reset pulse
  2. devices respond with a presence pulse

This is the protocol equivalent of knocking on the barracks door and waiting for someone to cough.

Master:  ________----------------________________
Bus:     ________----------------__----__________
                    reset pulse     presence

If no one answers, the line remains quiet and the master knows the bus is empty, broken, or lying.

IV. The Search Algorithm

This is where 1-Wire becomes unexpectedly clever.

Because every device has a 64-bit identity, the master can perform a search ROM procedure that walks through address-bit discrepancies and discovers every device on the line.

Important ROM-level commands include:

CommandPurpose
Read ROMread identity when only one device is present
Match ROMaddress one specific device
Skip ROMaddress all devices at once
Search ROMenumerate every device on the bus

That means 1-Wire can inventory itself.

For a protocol with one data line, this is indecently ambitious.

V. Parasite Power: The Great Electrical Miserliness

Some 1-Wire devices can operate in parasite power mode.

That means they draw energy from the data line itself, typically charging internal capacitance while the bus is high.

Power modeConsequence
local VDD providedsimpler power margins
parasite poweredfewer wires, tighter timing and current constraints

This is one of the reasons 1-Wire became famous for minimal-contact applications.

The line carries identity, commands, and in some cases the grudging minimum needed to keep the device alive.

The Supreme Leader has seen villages run on less.

VI. Where It Lives

1-Wire appears where cheap identification and low-pin-count sensing beat all other concerns.

UseWhy 1-Wire fits
temperature sensingsimple, cheap, addressable
iButtonsdurable token with a unique identity
inventory / taggingevery device already has a serial number
small embedded systemsone pin is easier than several

No one uses 1-Wire for glory. They use it because the economics are offensively practical.

VII. Why It Is Also Annoying

1-Wire pays for its minimal pin count with:

  • low speed
  • careful timing requirements
  • line integrity problems on larger networks
  • software and master-interface quirks

This is not a protocol you scale into a grand republic without planning.

It works best when the system remembers what it is:

cheap, small, addressable, and not in a hurry.

VIII. The Real Story (Suppressed)

Officially, 1-Wire is a low-cost serial bus for simple devices.

The suppressed version is that it solved two politically important problems at once:

  1. how to connect a device with almost no wiring
  2. how to ensure that even the cheapest device still has a permanent identity

That combination made it dangerous to ignore.

The protocol is poor. The census is excellent.

IX. The Lesson

Never confuse luxury with capability.

1-Wire is meager, slow, and occasionally irritating. It is also proof that if a system can identify every citizen and survive on one line, it may outlast richer protocols that demanded more ceremony.

— Kim Jong Rails, Supreme Leader of the Republic of Derails