Hi: I am using the (CY7C68013-128AC) uController from Cypress. I am trying to write a simple data to EEProm(24LC64 from Microchip). I am using Cypress's library functions, EZUSB_WriteI2C(byte addr, byte lenght, byte xdata *buf) and EZUSB_WaitForEEPromWrite(byte addr). This is a 'ezusbsys.h' library created by Cypress Semiconductors. Here is my code
BYTE xdata myBuf[] = {0xFF,0xFF,0xFF,0xFF) TD_Poll() { BOOL bWriteOk = FALSE; I2C_ADDR = 0x51; //im using the 24LC64(Large) EEProm on the development board to write data. EZUSB_InitI2C(); while(!bWriteOk){ bWriteOk = EZUSB_WriteI2C(I2C_ADDR, 0x09, &(myBuf[0])); } EZUSB_WaitForEEPROMWrite(I2C_ADDR);