4
\$\begingroup\$

We know that 1-wire devices, such as the DS18B20 temperature, sensor have 1 64 bit address, of which 8 bits is 0x28 and another 8 bits is the CRC. We know that the address is burned into the chip at manufacture. But where does the manufacturer obtain these IDs?

Presumably there are multiple manufacturers of the device. Is it the case that each is allocated a range by some central body? Or are they simply generated randomly, giving something like a 300 billion to one probability of a collision?

Pure curiosity.

\$\endgroup\$
2
  • \$\begingroup\$ "8 bits is 0x28" -- that's a family code (different for each type of device), with 1 bit selecting between generic or custom ID "namespace". I'm pretty sure that the number of DS18B20s produced in the ~24 years since they were introduced is quite a few orders of magnitude less than the 500+ trillion unique IDs available. \$\endgroup\$
    – Dan Mašek
    Jul 17, 2023 at 12:50
  • \$\begingroup\$ Granted the question was on 1-wire devices, but with a byte for the type and a byte for the CRC, that's 48 bits unique for each DS18B20, that's 281 (antiquated British) billion. I reckon you're right that it's substantially less. For sure, if they produced 700,000 per day for 1,000 years, they wouldn't run out of numbers. My curiosity for the actual number is crushing me, though. \$\endgroup\$
    – KDM
    Jul 17, 2023 at 19:23

1 Answer 1

9
\$\begingroup\$

The 1-wire protocol was developed by only one manufacturer. It was invented at Dallas Semiconductors which is now part of Analog Devices. In fact as long as you buy from this manufacturer you will get devices with unique IDs. A single manufacturer is capable of keeping record and track of all IDs used.

I never encountered a DS18B20 made by another manufacturer than the inventor. It might be possible to buy counterfeit devices somewhere by chance. However that's a different story. Counterfeit devices won't have unique IDs, if they exist. They even might show all the same ID within one batch.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ No, in truth, I've never encountered them made by anyone other than Analog. I just assumed it was a common die. I wonder how many exist in the world! \$\endgroup\$
    – KDM
    Jul 16, 2023 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.