This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

EZUSB-FX2 data to EEProm(24LC64 from Microchip)

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);

A very simple code.
Do you know wat could be wrong with this code? Any experience with these I2C library functions from Cypress?

0