PSOC5 USB Example

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
joli_601446
Level 5
Level 5
10 likes given 10 sign-ins 5 sign-ins

Hello, I'm looking for a simple USB example for the PSOC5. I have a PSOC5 Kit that I would like to try things out on. If anyone can help please let me know.

Thank you,

Joe

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Joe,

As mentioned by KyTr_1955226​ PSoC 5LP does not have support for USB Host

Best Regards

Ekta

View solution in original post

6 Replies
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

What kind of USB communication do you want to do ?

If you want to use a virtual COM port, I have an example project implementing FIFO to the CDC class device.

GitHub - noritan/Design307: FIFO Implementation for USBUART for BLOG - "CY8C5888LTI-LP097" on "CY8CK...

There are README files in English and Japanese to explain about the implementation.

If you want a high speed communication, I have an example project using the BULK transfers.

GitHub - noritan/Design302: Bulk Source Sink project for blog article - "CY8C5888LTI-LP097" on "CY8C...

This example is created as an appendix to my blog article in Japanese.

PSoC 5LP で BULK 転送 (1):新適当マイコン電子工作研究所:So-netブログ

PSoC 5LP で BULK 転送 (2):新適当マイコン電子工作研究所:So-netブログ

Sorry, there is no English version articles for this.

If you want to create a composite device containing both virtual COM port and BULK,  I have an example project for the composite device.

GitHub - noritan/Design262: UART-BULK Composite Device on 5LP - "CY8C5888AXI-LP096" on "FreeSoC2"

This has no README files, no articles.

Regards,

Noriaki

0 Likes

Hello, thank you for responding to my message. I would like to use the PSCO5 kit to development a USB host application. I don't know what a virtual comm port it.

Thank you

0 Likes

The PSoC5LP unfortunately cannot act as a USB Host, only as a Device.

Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Joe,

As mentioned by KyTr_1955226​ PSoC 5LP does not have support for USB Host

Best Regards

Ekta

Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Joe,

Please refer to the link: https://www.cypress.com/documentation/code-examples/psoc-345-code-examples  which contains code examples for the PSoC 5LP device. All the USB code examples for PSoC 5LP are available here.

Also, in PSoC Creator you can go to Find (on menu bar) > Code example. In the Find Code Example box select:

Device family: PSoC 5LP

Filter by: USB

pastedImage_1.png

The list of USB code examples available for PSoC 5LP will come up. You can download code example and Create project.

Please let me know if this helps

Best Regards

Ekta

RiAs_1660756
Level 4
Level 4
25 sign-ins 25 replies posted 10 replies posted

In reply to EktanN_26, I expect the OP doesn't really mean 'host'.  Just a slip in terminology, perhaps.

The CY8CKIT-059 is cheap and useable if you want to fiddle with USB.  If you want to use 'pure' USB, you are constrained to using the Cypress drivers, (i.e. cyusb3.sys) and the Cypress VID (vendor ID) and PID (product ID) but you are only permitted to do this for evaluating the product or some such restriction.  You categorically cannot use them commercially.  Or, if you are rich, you could cough up a few thousand dollars to the USB Implementer' Forum for your own VID/PID.

The next option is to use the driverless model.  This is for things like mice, keyboards and other standardised items that more or less do the same things.  One possibility here is to use the COM port emulation where your USB device pops up as a serial port on the PC and you can then use old-fashioned serial communications software to exchange information.

There is also a little example called 'square mouse' or something like that that makes your mouse dance around your screen in a very un-murinelike manner.  This demonstrates the HID mouse function and might entertain for a few minutes.

Also, on youTube, there is a demo of USB code which works but is a bit tricky to follow.

The CY8CKIT-059 has a break-off programmer / debugger.  This will also work with other PSoC parts and is as good as the MiniProg3 at a fraction of the cost.

0 Likes