How to change the USBUART example

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

cross mob
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

I like to use the USBUART example as a base for my project. I only need the USB connection. I would prefer HID but as I am a nebe on PSOC I thought to start with the USB UART example removing LCD and UART part using only USB receive/transmit. In the past I did so when starting with a (for me) unkown uC family / vendor.

Unfortunately this does not work. deleting LCD interface in TopDesign and the generated sources for UART and LCD the generated source is rebuild when generating the application. How is the procedure for using example for a base for a design... getting rid of all parts that are not needed by the new design. is there a book avaliable where I can find more information ? I already whatched some presentation on youtube. I worked with microchhip devices in the past and I now I have to use PSOC and it is not so easy for me for I cannot control phereiperals directly...

rgl
0 Likes
1 Solution

RuGl,

My Term component can be configured as USBUART and it will automatically use the PSoC5 on-board USB port.  The component simplifies UART-type communication (such as Term_PutString(), Term_GetChar(), etc).

There is a demo program called "Term_demo" that uses Term.  It's VERY simple in code structure.

Len

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
4 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

RuGl,

Is your desire to use the on-board USB as a USBUART for serial comm?

If yes, I have provided a custom user-installable component called Term.  This component can be configured as a standard UART (for example for talking to the KitProg board) or as a USBUART.

The component uses UART API calls to simplify the access to the USBUART functionality.

It is a little complicated to get started but I have included a number of documents to assist in configuring the user-installable component.

If you're interested, here is a link to the component library to access Term: Terminal Component - Simplifies UART or USBUART communication

Note: In addition, if you'd like there are a couple of other components in the library (documentation included) if you find them useful.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi Len,

I do not need the uart, I only need the USB part to connect my terminal to my embedded device. I have to communicate from PC to my Infineon Iso2H823 (Isoface DO) device by usb using a PSOC5. Therefore I need a usb device on my cypress psoc5. In the past I run an HID device on my PIV32MM (worked perfect) but for I had to change to cypress devices I have to rebuild my application. (Cypress and Infineon merged and now I have to migrate all my microchip designs to Cypress) HID is my preferred profile for running a comunication on a PC does not need an driver for windows. Cypress examples do only offer keyboard or mouse for HID profile. To have an easy start I thought to use the USB UART example, removing the uart and all not needed parts and add my control code for my iso2H823 (using only the USB CDC part). But this does not work for I cannot remove the uart and the lcd parts form example code.

I just need to send and receive some strings…. PC- USB – PSOC- iso2H823

I already asked the community if an HID profile (generic) other than mouse or keyboard (just a usb hid socket offering an send and a receive method) is available form Cypress (as I used in past … microchip offers such an example code in MLA). I was told to use the mouse example and read the datasheet for USB… I am just an Psoc beginner and I can read an talk English but it is not so easy to fully understand what I have to do and which option has which result…. So it is always a try and error…. And I would be glad to avoid such a design method…. But obviously I have to go that way… ☹…

rgl
0 Likes

RuGl,

My Term component can be configured as USBUART and it will automatically use the PSoC5 on-board USB port.  The component simplifies UART-type communication (such as Term_PutString(), Term_GetChar(), etc).

There is a demo program called "Term_demo" that uses Term.  It's VERY simple in code structure.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi RuGl_1600761​,

There are two things you can follow for your output as mentioned below. However, the first method can take a little more time than second method.

Method 1:

1. Disable the components from the TopDesign of your project, by following right click on the component ->disable  and build the project.

2. This will automatically lead to removal of generated source files for that particular component.

3. You can comment out the line of codes that executes the task for that component. The project will build successfully.

Method 2:

You can go through the USBFS_UART PSoC 5 code example. In this code example, the USBFS component is enumerated as a virtual COM port and sends received data back to the COM-port terminal. I have attached this code example for your reference here.

Thanks and Regards,

Aashita

0 Likes