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
  • Hi Tsuneo Chinzei I did call EZUSB_InitI2C() to initialize the I2C bus. after that I called EZUSB_WriteI2C() and EZUSB_ReadI2C(). However you mentioned if the status of I2C is not change, and I call that two functions will cause the MCU pending, that is a good question, I will check it and thank you.

Reply
  • Hi Tsuneo Chinzei I did call EZUSB_InitI2C() to initialize the I2C bus. after that I called EZUSB_WriteI2C() and EZUSB_ReadI2C(). However you mentioned if the status of I2C is not change, and I call that two functions will cause the MCU pending, that is a good question, I will check it and thank you.

Children