USB Connection - Page 1
Forum section: electronics / beginners

author: NJC
author_rank: Newbie
timestamp: July 10, 2010, 04:25:18 pm
content: Hey everyone,For my project, I need a USB device than can do at a minimum of 1Mbps and preferably more. I keep going back and forth between what kind of interface I want to use, or if I just want to use a microcomputer that has a USB stack built in, I cant decide. I was wondering if anyone had any experience with a USB board that was easy to get up and running that was pretty inexpensive (< $20 US). I'm open to any suggestions. I've been looking at some of the FTDI boards at SparkFun, but wanted to see all my options before I went ahead and bought something.Thanks,NJC

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2010, 06:51:26 pm
content: the devil is not lies on the board, but in the USB chip itself. i'm having fun with FTDI chip, and still is, but to reach the "real" 1Mbps through USB Connection... a further and deeper study need to be done. i havent!

author: migsantiago
author_rank: Frequent Contributor
timestamp: July 10, 2010, 07:38:43 pm
content: HelloI have achieved a 64kB/s speed (512kbps) by using a PIC18 working as an HID. If you implement 2 HID interfaces on one single device you could achieve a 128kB/s speed, which equals to 1024kbps or 1Mbps.A pic18 running at 48MHz (12MIPS) can easily achieve it.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 11, 2010, 12:03:34 am
content: i found out, USB got something with latency that delay the packet, maybe got to use bulk transfer or something to achieve that or even greater. USB 2.2 and FTDI (IIRC) theoritical speed is 480Mbps.

author: migsantiago
author_rank: Frequent Contributor
timestamp: July 11, 2010, 12:20:09 am
content: Interrupt endpoints are polled within a constant period. For Full-Speed endpoints that period can go from 1ms to 255ms.If you use a bulk endpoint you won't have a constant speed. Bulk endpoints only transfer data when interrupt or control endpoints are not using the bus. So, you might get high speeds when the bus is idle, but super low speeds when the bus is being used by other devices.

author: charliex
author_rank: Frequent Contributor
timestamp: July 11, 2010, 07:21:34 pm
content: I find that with the FTDI/prolific chips they tend to fail with large amounts of constantly streamed data after a while,usually needing a reboot, one of my friends mentioned a chinese usb<>Serial that didn't do that so i'm waiting to hear back which it was, however it was considerably more expensive.

author: NJC
author_rank: Newbie
timestamp: July 13, 2010, 09:10:34 am
content: Thanks for the responses guys. So from what everyone has said it seems like an FTDI chip might not be my best option.I think I am going to try my luck with a TI device, since I just ordered the LaunchPad. The 5xx devices have full speed (12Mbps?)(full speed??)(meh) USB and it seems as if it won't be too hard to implement. I'm pretty sure the LaunchPad can program this thing, and I'm hoping for a nice 5-8Mbps from it, so hopefully it will work. Wish me luck, lol.Has anyone ever achieved anything close to the 480Mbps? If so, using what?-NJC__________________________________http://msp430launchpad.blogspot.com/

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 13, 2010, 01:44:26 pm
content: Quote from: NJC on July 13, 2010, 09:10:34 amas i said, it is theoritical, i'm yet to find any single device, that can achieve nearly to that value, even my philips external hard drive and sony card reader is far from it. and the FTDI one that i've made an attempt on comm with pc only can reach around 152Kbps, but thats only packeted format. i never push it to reach the maximum, there is documentation for bulk transfer, but i havent try it. but if charliex problem is not localized, then FTDI might got some issue for high bitrate transfer. maybe only suitable for general purpose (low Kbps) usb to serial or parallel converter.edited: 152Kbps averaged... including latency time.

author: jahonen
author_rank: Super Contributor
timestamp: July 13, 2010, 06:17:06 pm
content: You never get the 480 Mbit/s out of high-speed USB because it is the physical signaling rate. That means that 480 Mbit/s includes bit stuffing, NRZI coding, frame headers, tokens, checksums, etc., etc. Expect something like 80-90% of that in practice.Regards,Janne

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 14, 2010, 11:10:26 am
content: Quote from: jahonen on July 13, 2010, 06:17:06 pmfor the devices i own. its still a way off the 80% mark, something like 10-50% is more practical.

author: charliex
author_rank: Frequent Contributor
timestamp: July 14, 2010, 07:29:10 pm
content: yeah a few people have found the ftdi issue, we use different serial adapters in our ECU's and one of the changes i made last year was t os witch from a relatively slow VT100 terminal emulation (yes inside a car ecu ! ) to a streaming based two way communication, i tried every single method i could think of to make it work, used the two styles of ftdi drivers vcp/comm and it just wouldn't work well on anything except pure RS232 16550's. They usually don't support things like overlapped io either, cancelling requests seemed to cause no end of problems.They work well for simple rs232 stuff, but if you really start hitting on it i saw all kinds of failures. FTDI have a developer forum and there was a bunch of talk on there about it too i recall.i wish i could find a cheap rs232<>usb serial adapter that you could just leaving running transfering data all day in and out. So far nothings beat a 16550 yet.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 15, 2010, 01:47:48 pm
content: so far, i have no issue with FTDI hanging or unstable, just low bitrate which is still acceptable for my project. but i never try it 24/7 continuous. i think there are lot of good features in FTDI that i'm yet to discover. i just got my 10 Unit order from ebay. so in hand currently i own 12 unit of FT232RL ready to be put in any future project. maybe as a begineer, it suits me well, and its kind of "homer" usb chip right now for me, as more and more small/hobby devices i bought and saw in the net is using this chip.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 15, 2010, 03:17:25 pm
content: Quote from: charliex on July 14, 2010, 07:29:10 pmHave you tried modifying the kernel module to work around the problem?

author: Zad
author_rank: Super Contributor
timestamp: July 15, 2010, 08:22:45 pm
content: Have you tried using the FT245 parallel interface version?

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 15, 2010, 10:44:49 pm
content: Quote from: Zad on July 15, 2010, 08:22:45 pmi sent uart data into FTDI at 2Mbps, but yet only 100++ Kbps reach to the pc, i think serial or parallel will not make any difference, the bottle neck is in the USB, i think... but yet, i havent try.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 16, 2010, 01:35:45 am
content: Quote from: shafri on July 15, 2010, 10:44:49 pmUSB 1.1 should not have any problems with 2Mbps. Try using lsusb to make sure it is not sharing an OHCI or UHCI with anything else. (I also remember reading that OHCIs tend to be a little faster than UHCIs.) Try using a different cable.You might want to look at a chip that offers USB 2.0.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 16, 2010, 01:51:05 am
content: yup u ar rite. its a 12Mbps device, just re-checked the spec. but still far off from the stat i gave. anyway, will try the UHCI thing when i really have a need, so far so good with the 100++Kbps. thanx for d info nihao. btw, i just noticed that TI is just releasing their USB3 chip. check it out in their home web. i never look into detail of it.

author: charliex
author_rank: Frequent Contributor
timestamp: July 16, 2010, 04:15:39 am
content: I dont really think there is anything wrong as such with the FT232/245's they've just got limitations, they work just fine for a lot of stuff.