Report external EEPROM attached

Hi. I'm working with an Arduino Mega. The internal EEPROM is a dream to use but I've gone on to get a 24LC256 to attach via I2C. I had planned on just using the Wire library, not something esoteric.

I'm not sure of how it and the internal EEPROM will work together. Can someone please help with that aspect? Are they seen and treated as two separate devices in some way or are they just seen as a blob of contiguous memory?

Is there a recognised way of programmatically simply detecting the external device as attached and ready for use? I could just attempt a read from it but I'm not sure of the ramifications of that approach.

(deleted)

Thanks Spycatcher, that makes sense with what I've learned since posting. I knew they were physically different of course but programmatically I now see the setup much more clearly. EEPROM v Wire.

I have read advice that seems to suggest just attempting to connect to the external device and reading from it to confirm its presence. With a couple of bytes of known dummy data in the first two positions it is easy to recognise when it is read correctly. I am just surprised I can't find a function which either specifically confirms connection or one that reports it as a return value representing the state of being in communication with a device. Maybe it is there and I'm just missing it.

You can use/modify the I2C scanner to see whether the I2C EEPROM is responding to its address.

Pete

I have read advice that seems to suggest just attempting to connect to the external device and reading from it to confirm its presence. With a couple of bytes of known dummy data in the first two positions it is easy to recognise when it is read correctly. I am just surprised I can't find a function which either specifically confirms connection or one that reports it as a return value representing the state of being in communication with a device. Maybe it is there and I'm just missing it.

Here is how the code in the common i2c address scanners do it

Wire.beginTransmission (0x50);//EEPROM address
 if (Wire.endTransmission () == 0)
      //device is recognized on the buss