Read external EEPROM

Good day,

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.

I have bought the Microchip 25AA02E48 and would like to read the MAC address, i have downloaded this library: GitHub - akafugu/Microchip_25AA02E48: Arduino library for Microchip 25AA02E48/25AA020A

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 connected the EEPROM like this (got it here https://www.arduino.cc/en/Tutorial/SPIEEPROM):

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

W5500 module: https://www.amazon.com/USR-ES1-W5500-Ethernet-Converter-Module/dp/B07KNVN6W9

Write Protect (/WP) has to be tied high if you're not controlling it. By leaving it floating it will do who knows what?

/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.

Thank you for the help, but connecting both /WP and /HOLD to +5V doesn't change the output, i still get these values:

EUI48 (hw address): 00-00-00-00-00-00
08:56:47.951 -> EUI64: 00-00-00-FF-FE-00-00-00
08:56:47.985 -> Wrote 0xCC to address 64.
08:56:48.020 -> Read from address 64: 0x0

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.

Okay, than i think it is correct,

I get these values:

EUI48 (hw address): 00-04-A6-0E-07-EC
EUI64: 00-04-A6-FF-FE-0E-07-EC
Wrote 0xCC to address 64.
Read from address 64: 0xCC

So that means the first value is my mac address? (00-04-A6-0E-07-EC)

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.

Datasheet on this page:

Correction, I think you have it. See page 14 of the datasheet, it does have FF FE in the middle.

Ah i see, thank you for the help!