Writing Host application code for cy68013a | Cypress Semiconductor
Writing Host application code for cy68013a
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 writen the .NET code to establish connection with the device and I can see the EndPoint data there too.
Now I need to start transfering 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 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.
I've hit a big wall, and any help would be greatly appreciated. I realize that the board is not Cypress, although the USB controller is. Any help would be greatly appreciated, as this is my first experience interfacing with hardware and I have a customer who is going to want to see data flowing from the device to my app within the next week.