3 Replies Latest reply on May 7, 2020 7:13 AM by JoLo_285951

    Problems with I2C/PSOC5 LP and Digital Pot MCM4661


      Dear All:

      I am working with a design requiring a digital potentiometer, in this case the MCP4661 from Microchip.  Please find attached datasheet of this chip.

      To test the potentiometer, I am using CY8CKIT-050 and the Evaluation kit of the potentiometer. See attached, the User Guide of the Evaluation kit of MCP4661 and a photo of the assembly I am using to test it.

      I just want to write and read from register of the MCP4661. Write, to set the resistor and read to know the actual value.

      I have developed two functions (see attached project) to write and read:

      void mcpWrite(uint8 chipAddress, uint8 Register, uint8 Value);

      uint16 mcpRead(uint8 chipAddress, uint8 Register);


      I have a problem on both functions. When I write with I2CM_MasterWriteBuf, and then, wait until transfer complete with (see line 77, on MCP4661_I2C.c):

      if (0u != (I2CM_MasterStatus() & I2CM_MSTAT_WR_CMPLT)),

      It never ends, stay in this loop forever.

      On the other hand, I2CM_MasterWriteBuf, return I2C_MSTR_NOT_READY

      Can anyone give a hand and tell me why I am no able to communicate with MCP4661? Any idea? Any comment will be welcome.

      Please find attached also the Evaluation kit schematic that I am using (hand-drawn). The kit is populated with MCP4661 by default, that I want to use.

      Attached also the project I am using to test it.

      Thanks in adavance,