New Microchip 25AA02E48 arduino library


25AA02E48 chip

In order to make it easier to test out various features of the XmegaDuino project, we decided to start development on an Ethernet shield for the Akafuino X. During our research, we found a really cool EEPROM chip: The Microchip 25AA02E48. It only has 256 byte of memory, but it has a EUI-48(TM) certified address burnt in to the memory when delivered from the factory. 1/4th of the memory (the part where the address is written) is write protected.

For people not familiar with EUI-48(TM) addresses, they are used as unique identifiers for ethernet cards, Better known as MAC or Hardware Address.

In the Arduino world it is fairly common to just pick a address and hope that nothing on the local network has the same address. For testing that is OK, but if you have many devices on one network (or want to sell your project), it may become troublesome.

It is possible to purchase an address range from IEEE, but this will cost several thousand dollars. Also, you cannot buy just a few addresses, but will need to buy an entire range. If you instead fit each ethernet device you produce with a 25AA02E48 EEPROM, you have a guarantee unique MAC address available at a nice low cost.

We couldn't find any suitable Arduino libraries, so we decided to make one for ourself. It is available ongithub.

The library also supports the 25AA020A, which is essentially the same chip, but without a MAC address and the write protection.

Both chips are SPI-based, and the library should be possible to adapt to other EEPROM chips that use SPI as well.