PDA

View Full Version : Possible to detect I2C Device?



Squibcakes
- 30th March 2007, 00:35
Hi Guys n Gals,

Is it possible to poll a I2C eeprom to detect what size it is?

For instance, if I had a 24LC256 installed and later upgraded to a 24LC515 chip, could the pic detect the size increase or hardware number etc and make use of the extra memory in the bigger eeprom?

Cheers

Squib

skimask
- 30th March 2007, 03:55
Hi Guys n Gals,

Is it possible to poll a I2C eeprom to detect what size it is?

For instance, if I had a 24LC256 installed and later upgraded to a 24LC515 chip, could the pic detect the size increase or hardware number etc and make use of the extra memory in the bigger eeprom?

Cheers

Squib

About the only way I can think of is to write a value at 64K-1, read it back, then write another value and see if it changes. If it does, you can be reasonably sure it's a '515, if it doesn't, '256.

Acetronics2
- 30th March 2007, 10:13
http://www.picbasic.co.uk/forum/showthread.php?t=1908&highlight=EEPROM+SIZE

.... no comment