2 Replies Latest reply on Oct 8, 2012 10:10 AM by userc_43869

    CY7C68013 & CY7C64713 Commands

      I'm using the CyUSB.dll file to control the CY7C68013 and CY7C64713 in some legacy gear.  Where do I find a list of what the commands do or a defintion of the SPI interface to the CyUSB.dll?  The FX3 suite does not appear to have what I need.

        • 1. Re: CY7C68013 & CY7C64713 Commands

           You can find the API guide (CyUSB.NET.pdf) at location C:\Cypress\Cypress USBSuite\library\c_sharp after installing USB suite from http://www.cypress.com/?rID=57990







          • 2. Re: CY7C68013 & CY7C64713 Commands
            The document defines 'writeoutput' but I can not find where it defines what the output buffer bytes do.  I've included a bit of my code that accesses the CY7C68013. This is legacy code I'd like to pull into the present.  Specifically I'd like to see the definition of command 0x0001 written to the first 2 bytes of the output buffer. Where is the definition of what the output buffer contents mean?  Also similar commands sent to the Cy7C64713 do not seem to work.            /// <summary>        /// do an I2C transction with the CY7C68013        /// </summary>        /// <param name="dev">HID dev</param>        /// <param name="address">dev address</param>        /// <param name="outbuf">output buffer</param>        /// <param name="outlen">output length, zero if no data</param>        /// <param name="inbuf">input buffer</param>        /// <param name="inlen">input lenght, zero if no data</param>        /// <returns>pass/fail</returns>        byte usbI2CTransfer(CyHidDevice dev, byte address, byte[] outbuf, byte outlen, ref byte[] inbuf, byte inlen)         {             dev.Outputs.DataBuf[0] = 0x00;                  //command 00            dev.Outputs.DataBuf[1] = I2C_TRANSFER;          //command 01            dev.Outputs.DataBuf[2] = 0x00;                  //not used            dev.Outputs.DataBuf[3] = address;             dev.Outputs.DataBuf[4] = outlen;             dev.Outputs.DataBuf[5] = inlen;             dev.Outputs.DataBuf[6] = 0x03;                  // control            for (int i = 7, j = 0; outlen > 0; ++i, ++j, --outlen)             {                 dev.Outputs.DataBuf[i] = outbuf[j];             }               usbWriteRead(dev);               for (int i = 0, j = 3; inlen > 0; ++i, ++j, --inlen)             {                 inbuf[i] = dev.Inputs.DataBuf[j];             }               return (byte)(dev.Inputs.DataBuf[1]);   // FW_Status        }
                    /// <summary>        /// write output buffer, wait, then read response        /// </summary>        /// <param name="dev">HID device</param>        void usbWriteRead(CyHidDevice dev)         {             dev.WriteOutput();             System.Threading.Thread.Sleep(5);             dev.ReadInput();             System.Threading.Thread.Sleep(5);         }  I might have missed something in CyUSB_NET.pdf