Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Multiple USB devices application

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Multiple USB devices application
Moderator:
RSKV

Post Reply
Follow this topic



Multiple USB devices application

MartinH posted on 08 Dec 2012 10:24 AM PST
Member
5 Forum Posts

Hi,

I am writing an application which need to manage two same USB devices and I am using cypress cy7c68013A as the controller in the device. How can I manage to control these two devices in my application. Do I need to generate two independent instances using CCyUSBDevice for these two device?

Thanks,

Martin




Re: Multiple USB devices application

RSKV posted on 09 Dec 2012 07:11 AM PST
Cypress Employee
655 Forum Posts

Hi Martin,

You can have two different serial numbers assigned to FX2LP devices and you should be able to distinguish the two devices based on serial numbers once the enumeration is done.

Thanks,

sai krishna.



Re: Multiple USB devices application

MartinH posted on 10 Dec 2012 02:16 PM PST
Member
5 Forum Posts

Hi Sai,

Thanks for the reply. If I don't use the serial number, what do I need to do to access multiple devices by the Cylib.lib?

regards,

Martin

 



Re: Multiple USB devices application

RSKV posted on 11 Dec 2012 08:19 AM PST
Cypress Employee
655 Forum Posts

You need to have some other differentiator between those two devices...

Regards,

sai krishna.



Re: Multiple USB devices application

TheThinker posted on 13 Dec 2012 12:11 AM PST
Senior Member
17 Forum Posts

Hi Martin,

If you want to communicate to two devices, you will need at least either different PIDs or different serial numbers as Sai has conveyed. The application needs to know of a way to differentiate between devices.

Also, you cannot communicate with two devices at the same time using CyAPI.lib. Session with one device has to be closed and only then you can communicate with the other. You can communicate one after the other.

Njoy...



Re: Multiple USB devices application

MartinH posted on 16 Dec 2012 01:36 AM PST
Member
5 Forum Posts

Hi,

Thanks. If I need open two device which have the same PID and VID which may use different serial number at the same time for I need to combine the data which are collected form these two devices in my application. what do I need to do?

I know that some of applications can open multi-devices which use the same PIDs and don't use the serial number. The application find the device by the USB hub and port address. Will Cylib give the similar solution?

Thanks,

Martin

 



Re: Multiple USB devices application

TheThinker posted on 19 Dec 2012 11:13 PM PST
Senior Member
17 Forum Posts

Hi Martin,

I could see two devices with the same PID_VID being detected on Control Center and you can communicate with them one at a time.
You can definitly not communicate with two devices at the same time using CyAPI.lib. You can use the threads in CyUSB.net.

You can achieve it in CyUSB.NET.
There are different ways of identifying a device to be accessed  in CYUSB. You can use the index operator to identify the device: USBDeviceList [int index] in CyUSB.NET APIs.
I am attaching an application in CyUSB.NET I built for this purpose. Simply attach two devices programmed with streamer firmware.

You can refer to this if you are searching to build an application on CyUSB.NET.

Njoy...

 



Re: Multiple USB devices application

MartinH posted on 20 Dec 2012 01:10 PM PST
Member
5 Forum Posts

Hi,

Thanks for the suggestion.  I haven't seen the attachment.

regards,

Martin

 



Re: Multiple USB devices application

TheThinker posted on 21 Dec 2012 10:36 PM PST
Senior Member
17 Forum Posts

Somehow it didn't get attached.

Attaching here again.

Do verify once if I'm correct that its communicating with different devices. Someway to display on the device, when its communicating.

 



Re: Multiple USB devices application

TheThinker posted on 21 Dec 2012 10:39 PM PST
Senior Member
17 Forum Posts

Didn't attach again....
Probably because its a .rar file.
attaching the file...

Njoy...



Re: Multiple USB devices application

MartinH posted on 21 Dec 2012 11:09 PM PST
Member
5 Forum Posts

Hi,

I got it. Thanks.

Martin

 

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.