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

call EZ-USB I2C function

Hi everyone there is a mistake when I want to write address 0x1d with the data 0x0f after called EZUSB_WriteI2C (); and EZUSB_ReadI2C (); the detail operations are as below:

BYTE xdata reg = 0x0f; BYTE xdata temp[32];

EZUSB_WriteI2C (0x1d, 0x01, ®); EZUSB_ReadI2C (0x1d, 0x01, &temp[0]);

after these code linked and download to board, the PC cant recognize the device, however these are commented out, the device can be normal recognized well

thx for your help

Parents
  • Call EZUSB_InitI2C() once, before calling these functions.
    It initializes I2C interrupt.

    In an infinite loop, these I2C read/write functions poll the I2C status change caused by I2C interrupt. When no change occurs on the status, MCU execution is trapped in these functions.

    Tsuneo

Reply
  • Call EZUSB_InitI2C() once, before calling these functions.
    It initializes I2C interrupt.

    In an infinite loop, these I2C read/write functions poll the I2C status change caused by I2C interrupt. When no change occurs on the status, MCU execution is trapped in these functions.

    Tsuneo

Children