|Hand tools and fabrication machines:|
This project is tested only on Windows 7 machines.
A composite USB device is a sing USB cable that enumeratesas multiple device class. A typical example for this is the Kitprog availablein the PSoC4 based kits. The Kitprog enumerates as USB-CDC port, USB-I2C bridgeat the same time. This example gives the same PSoC4200L acting as a USB -Audioand USB-CDC and USB HID at the same time.
For having only one device class implemented theprocess is straight forward. But for multiple device class we need a specialdescriptor called IAD (Interface Association Descriptor). The documentavailable here tells about the IADs in detail. IAD will just act as an indicator saying thatthe set of Interfaces is part of a single function. An interface associationdescriptor must be located before the set of interface descriptors (includingall alternate settings) for the interfaces it associates. All the interfacenumbers in the set of associated interfaces must be contiguous.
Similarly, there is IAD associated with the other two deviceclasses as well. The Function Class, Function Subclass and Protocol fieldsneeds to be filled with the values show in Figure 1. This is as per the USB IADspecification.
Also the Device Class of the USB needs to be selected as 00(ie, Defined in Interface Descriptor) as given in Figure 2.
If the device is plugged, it enumerates as multiple deviceclass.
For automatic installation, custom INF is required forWindows. Custom .inf file is not available at this point of time, so we usemanual driver installation. Following are the steps required to be followed ona Windows 7 machine.
NB: USB HID will automatically get installed.
Steps in Windows7:
#1 Connect the project to Windows 7, it will enumerate as:
#2 Select CY8CKIT-046 USB Audio and do ‘update driversoftware’
#3 Choose “Browse my Computer for driver software”
#4 Choose “Let me pick from a list of …”
#5Select as per the following Figure
#6 Select the “USB Audio Device” option
Now the USB audio will be enumerated properly.
#7 For CDC proceed with “Update Driver Software…”
#8 Choose “Browse my Computer for driver software”
#9 Choose “Let me pick from a list of …”
#10 Press Next
#11 “Have disk”
#12 Browse: **\CY8CKIT_046_USB_Audio.cydsn\Generated_Source\PSoC4
Then the CDC will also get enumerated properly.
For MAC/Linux, custom driver files might be required. Theproject will not work on those Oss. Also please note that the .inf generated byPSoC Creator is not signed.
Once enumeration is done, then the same PSoC4 will functionas USB Audio, USB CDC and HID. For testing Audio functionality chose kit USB asthe audio output device and play music. Music should be played on the kit. Youcan listen to the song is you plug a headset on the J16 audio jack.
For testing the Comport CDC interface open the kit USB CDCinterface. You can see continuous “hello” messages being displayed on theCOMPORT terminal.
PSoC Creator ProjectC/C++
No preview (download only).
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!