USB communication

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

cross mob
Anonymous
Not applicable

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.....
 

0 Likes
9 Replies
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

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......

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

Zigbee will be connected with the PSoC board for wireless transmission

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

 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. 

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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..

0 Likes