Hi
I'm trying to add an external EEPROM to my Cypress EZ-USB NX2LP-Flex dev kit, and accessing it using the library functions EZUSB_ReadI2C(), EZUSB_WriteI2C() and EZUSB_WaitForEEPROMWrite().
I plugged in a new 2Kbit EEPROM in the DIP socket and thought it was the only EEPROM there, and I tried reading it at address 0xA0, and was able to get all 0xFFs. I tried to write a single byte to the EEPROM with the following code:
BYTE xdata temp1; BYTE xdata temp2[8]; BOOL wrOK = FALSE; temp1 = 0x01; while (!wrOK) wrOK = EZUSB_WriteI2C(0xA0,0x01, &temp1);
I then read to read 8 bytes back with the following code
EZUSB_ReadI2C(0xA0,0x08, &temp2);
Instead of getting all 0xFF except for the 1st byte, I got all 0x01.
I then realized that there are more than 1 I2C EEPROM connected to the SDA/SCL lines, so I'm wondering how do I address the correct one? And once I do that, how do I specify the memory address within the chip? I know the device address for all EEPROM starts with 1010(0xA), but I'm confused as to the later 4bits.
Thanks.