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?

Parents Reply Children
  • "Do you know wat could be wrong with this code?"

    As Dan says, you haven't actually described any problem with it at all!

    Does it not compile?
    Does it not download?
    Does it not do what you expected? - in this case, you need to describe what you expected (it could be just your misconception), and what actually happens. You should also describe what steps you have taken so far to debug it yourself.