You are here

USB communication | Cypress Semiconductor

USB communication

Summary: 9 Replies, Latest post by amitni on 13 Apr 2012 09:21 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
amitni's picture
User
12 posts

I want to transfer a file form PC to Psoc board using USB communication... can this be done.... can anyone help by providing code related to this.....
 

U2
uday's picture
Cypress Employee
569 posts

 Hello there, what kind of file do you wnat to transfer. What size is it ? In order to get a reliable transfer over USB it is recommended to use USB Bulk transfer. If you intend to use PSoC3 then you can use the App Note here as the starting point, http://www.cypress.com/?rID=39553

amitni's picture
User
12 posts

Thank you.....  i want to transfer a video file which is of 10 mb around... while transferring file to the PSoC i will transmit it wirelessly simulateously......

hli
user_78878863's picture
User
2759 posts

What do you want to do then with this file? (The PSoC has not enough memory internally to store it). Should the PSoC to the wireless transfer then?

Another way might be using the USBUART component, which is the easiest one in term of implementation, but is much slower than doing USB bulk transfer.

amitni's picture
User
12 posts

ya i am aware about memory of PSoC....  yes i will be transmitting the data wirelessly simulatenoulsy as it cant be stored on PSoC...... can a data around of 1 mb be transferred to PSoC through USB communication

amitni's picture
User
12 posts

Zigbee will be connected with the PSoC board for wireless transmission

user_1377889's picture
User
10803 posts

The max transmition frequency is 6MBits/s (Datasheet Tx8) divide by 12 (Start and stop-bits) gives 500,000 Bytes/s = 0.5 MB/s

So for 1MB you would use 2 seconds. That's the UART side.

You will have to make a similar calculation for the transmition via RF and the speed MUST be greater or equal to the receiving side of the PSoC.

Your system must not necessarily be interrupt driven, but you will need a "Circular Buffer"  (software technique) to have some bytes "headroom".

 

Happy coding

Bob

U2
uday's picture
Cypress Employee
569 posts

 The maximum transfer that you can achieve using PSoC3 USB+Cypress library(CyUSB.sys) is 1 MBps(1 Mega Bytes per second). However, it is not always possible to achieve this due to various limitations. But you can easily achieve speeds greater than 500kBps using a bulk transfer. And since you need extremely reliable communication, BULK transfer is the way to go. 

Eilrem.CML's picture
Cypress Employee
14 posts

amitni,

You also have to consider whether you want to emulate a USB camera on the PC side or just stick to file streaming. Is this just a file you're transferring or are you streaming from a camera? If so, what's the frame rate and resolution?

Bulk transfer is good for data transfer that requires reliability but has no latency requirements. Isochronous is better for real-time applications.

amitni's picture
User
12 posts

I have used serial communication using RS 232 with the help of hyperterminal software to traansfer video file.... But at the receiver end i am getting symbols how can i get the video instead of symbols..

Log in to post new comments.