Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Simple USB HID device :-P

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



Simple USB HID device :-P
Moderator:
ANCY

Post Reply
Follow this topic



Simple USB HID device :-P

WebSpinner posted on 28 Aug 2012 12:02 PM PST
Member
2 Forum Posts

 

Hi everyone.

I have to implement a USB HID device and I find the documentation a bit overwhelming!

My device needs to have three 'Write Reports' - each 6 Bytes long, and 1 'Read report' which is 3 bytes long. 

(Read and Write here as with repsect to the device, so a program on a PC can write to Report ID 1,2 or 3, and reads Report ID 1)

I have no idea how to set this up using the USBFS component! I am finding the documentation quite overwhelming, maybe because I don't know exactly where to start.

I have looked at the config section in USBFS component, and set the Product ID and Vendor ID etc in the 'Device Descriptor', and I have set the 'Configuration Descriptor' as best I can, but I'm not sure how to set up the rest of the interface descriptor to make it provide what I need!

Can anyone show me the basic steps here?

Many thanks! 




Re: Simple USB HID device :-P

Gautam Das posted on 28 Aug 2012 09:38 PM PST
Cypress Employee
742 Forum Posts

Hi WebSpinner,

 

Did you try reading the application note on USB HID?

It is available at http://www.cypress.com/?rID=39404



Re: Simple USB HID device :-P

WebSpinner posted on 29 Aug 2012 05:48 AM PST
Member
2 Forum Posts

 Many thanks for that.

After reading the data sheet, and another one linked to from the first, I was able to get my prototype running :-)

 



Re: Simple USB HID device :-P

Gautam Das posted on 29 Aug 2012 09:59 PM PST
Cypress Employee
742 Forum Posts

Great going, WebSpinner !



Re: Simple USB HID device :-P

SpiderKenny posted on 30 Aug 2012 12:04 AM PST
Top Contributor
83 Forum Posts

 The attached project gives exactly what you need :-)

Just adjust the PID and VID values, and the manufacturuer strings to suit your particular device.

This one is for PSoC 3 however, so for PSoC5 you will need to adjust the Clock settings and use an external 24Mhz crystal.

-Kenny.

 

FULL DISCLOSURE:

WebSpinner and Myself are work colleagues although not working on the same projects, we both work for Spider Electronics in the UK.






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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20