Help with USBFS to UART code

Discussion of the PSoC CY8C24x94 and other PSoC like USB parts from Cypress should be discussed here. This forum is limited to the discussion of USB portion of those parts. Other forums should still be used to discuss the non USB features of these parts.

Moderator: ericb

Help with USBFS to UART code

Postby boaz » Mon Mar 12, 2012 8:50 am

Hello,
I'm working with Cypress PSoC Creator 1.0 in the following project:
• USBFS component
• UART component
My Cypress board is connected to my PC via USB and to a UART port.
I've created a physical loop in the UART port so that any received input should be transmitted right back.
Now I'm programming the main.c into the Cypress chip, and want to check that actually any data written to the UART component can be read from it. Can you please help me with a code example that accomplishes this task?
Many thanks,
Boaz
boaz
Newbie
Newbie
 
Posts: 1
Joined: Mon Mar 12, 2012 8:25 am

Re: Help with USBFS to UART code

Postby bobmarlowe » Mon Mar 12, 2012 9:29 pm

A QND solution would be to connect Tx and Rx of the UART to see that every transmitted byte can be received. It is your choice if you make the connection before or after the level-shifter to include them into this loop.

Loop-di-loop!
Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: Help with USBFS to UART code

Postby orob » Tue Mar 13, 2012 6:01 am

USBFS is pretty wide open. I've seen and made programs that do USBUART to UART, but to really be of value, more information is needed on what type of USBFS you are looking for. Did you want bulk, HID, or interrupt transfer? What software on the PC will be communicating? If it is USBUART to UART, I probably have one that might get you started, but like bob said recently, it might suffer from the effects of natural entropy. :wink: I'd like to help, but to do so will require a little more information.
orob
The Big Cheese
The Big Cheese
 
Posts: 606
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: Help with USBFS to UART code

Postby bobmarlowe » Tue Mar 13, 2012 6:57 am

An explanation of the term "natural entropy":
The (negative) entropy is a measure for the ordering of a system, a water-crystal is more odered (lesser entropy) than a drop of water.
So a well and neatly ordered, easy-to-read, easy-to-understand program has less entropy than a usual one. :wink:

And:
Systems tend to become chaotic by themselves, if you want to order them, you have to insert (sometimes a lot of) energy. This is a natural law, so some people try to avoid fighting against it.
Some do not.

Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany


Return to “%s” USB

Who is online

Users browsing this forum: No registered users and 1 guest