I am trying to write some application software that will access an Analog Devices AD7152 device that uses the cy68013a. I want to use the CyUsb.sys driver and the CyUSB managed .NET library to communicate with the device through the device driver.
The AD7152 ships with the ezusb.sys driver, but I already got the CyUsb.sys driver working. I can see the device in CyConsole and see all the End Points it exposes. I have written the .NET code to establish connection with the device and I can see the EndPoint data there too.
Now I need to start transferring data from this device. It is a capacitance Analog to Digital Converter. This is where there is a large gap in my knowledge. Looking at the AD7152 documentation, I was expecting to see information related to EndPoints, but it does not mention End Points at all. Instead, there are statements like "The master initiates a data transfer by establishing a start condition, defined by a high-to-low transition on SDA while SCL remains high," which seem way too low level for my situation. I'm not writing firmware for the device, after all.
There are several useful tables in the AD7152 documentation, however, but no sample code. I do know that I need to write 0x19 to register subaddress 0x0F to enable channel 1 and channel 2 for continuous operation. However, I have no idea how the concept of register translates to the concept of End Point. I have a feeling I need to send 0x90 to initiate the Write to the setup register. Therefore, I probably need to send 0x900F19. But, I don't know if I need to send these bytes all in one write operation, or separately.
I tried to use the CyConsole to write to the device on different End Points, but I always get "Control Transfer Failed." I was thinking I could use CyConsole to figure out what bytes I need to write and read and what End Points to use, and then translate this into code. Maybe I have an endian problem? I don't even know where to begin.
I've hit a big wall, and any help would be greatly appreciated.