For a project which uses an ethernet shield i need to identify a unique MAC address. Since i don’t want to program every individual device i found a way (i think) to get a unique mac address.
The only problem is it doesn't show how to connect the EEPROM to the Atmega328p (i am using the Atmega328p to connect to the internet so it is different than the 1284P i said previously).
I used this tutorial to connect the EEPROM to the Atmega but i can't get it to work, this is my output:
EUI48 (hw address): 00-00-00-00-00-00
EUI64: 00-00-00-FF-FE-00-00-00
Wrote 0xCC to address 64.
Read from address 64: 0x0
I have to mension that this Atmega328p will take care of the internet connection so i have also connected the W5500 module to it (it shares the miso, mosi etc...), if i disconnect these wires, i get this result:
EUI48 (hw address): FF-FF-FF-FF-FF-FF
EUI64: FF-FF-FF-FF-FE-FF-FF-FF
Wrote 0xCC to address 64.
Read from address 64: 0xFF
/HOLD needs to be tied high too. The bar over the pin name indicates that it is active LOW, meaning that a low on that pin activates its function. Tying it high makes sure that it doesn't hold.
Update, i think i got it working, i had to change the const uint8_t chipSelectPin to (in my case) pin 10, now i get some values, does it mean that the address shown behind EUI48 (hw address) is the MAC address?
Can i be 100% sure i can use this value or is my thinking wrong?
I haven't used that chip, but I looked at the datasheet and the "64" address overlaps the "48" address, so they should have six bytes in common with the "64" being the same but with two additional address bytes.
Doesn't look right to me. My reading of the datasheet is that the two address fully overlap. The "64" address should have two additional bytes on one end, not in the middle.