Every now and then you need a way for your devices to uniquely identify themselves. In the PC world you have MAC and IP addresses, both of which are controlled by a central authority. But what about your single board computer, or other device which carries a microcontroller?
IC manufacturer Maxim has a solution: the Silicon Serial Number, or SSN. The DS2401 is such a device. Basically it's a small laser-programmed ROM. Maxim guarantees that each SSN is unique. The DS2401 is a 64-bit serial ROM, which contains
The family code is always the same, and the CRC is depending on the 48-bit code, so neither adds to uniqueness. The unique code is therefore 6 bytes long, and uniqueness is only guaranteed when all 48 bits are taken in consideration. This can be a disadvantage if you only have a couple of dozen devices in your network, where a single byte code would suffice. On the other hand an SSN is really read-only, so it can't be tampered with.
But is the DS2401 the best solution, or are there alternatives?
What about a serial EEPROM? EEPROMs have much smaller memory sizes than their non-volatile counterparts, Flash memory. This makes them much more expensive per bit of storage, but we only need something like 8 bytes, so that can't be too expensive, can it?
The smallest EEPROM I could find, the Microchip 24AA00, holds 16 bytes or 128 bits. Seems just right, doesn't it? But when we look at the datasheet we see that the 24AA00 can't be write-protected, so it's not a good part to emulate a real ROM. How about the 24AA01? At 128 bytes instead of 16 eight times as much memory, but the good news is that it's hardly more expensive. And it can be write-protected. Let's compare the 24AA01 with the DS2401. (For good measure I'll add a variant of the 24AA01, the 24AA01H. More about that one later.)
|Interface complexity(note 1)||high||low||low|
|Uniqueness code||6 bytes||1 bit up to 128 bytes||1 bit up to 128 bytes|
|Supply voltage||2.8V - 6V||1.7V - 5.5V||1.7V - 5.5V|
|Price(note 2)||@ 1||USD 1.68||USD 0.18||USD 0.22|
|@ 100||USD 1.26||USD 0.17||USD 0.20|
|@ 5000||USD 0.88||USD 0.14||USD 0.14|
|Datasheet||11 pages||34 pages||30 pages|
We haven't discussed prices yet, but from the table it's immediately clear: the SSN is terribly expensive, up to 9 times the price of the EEPROM. It has also a more cumbersome (and slower) interface, and you have to use 48-bit codes. For the EEPROM I mention “1 bit up to 128 bytes” codes, and that's actually true: if you only need to identify 2 devices you can assign one a binary “0” and the other a binary “1”.
So why did we add the 24AA01H to the table? It's only a couple of cents more expensive than the 24AA01, but has an interesting feature: we can write-protect half of the memory and use that to emulate our ROM, and still use the other half as common EEPROM!
So compared to the EEPROM the SSN
The EEPROM is the better solution.