Author Topic: USB Connection  (Read 9529 times)

0 Members and 1 Guest are viewing this topic.

Offline NJCTopic starter

  • Newbie
  • Posts: 7
    • MSP430 LaunchPad Blog
USB Connection
« on: July 10, 2010, 04:25:18 pm »
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
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #1 on: July 10, 2010, 06:51:26 pm »
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!
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: USB Connection
« Reply #2 on: July 10, 2010, 07:38:43 pm »
Hello

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

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #3 on: July 11, 2010, 12:03:34 am »
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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: USB Connection
« Reply #4 on: July 11, 2010, 12:20:09 am »
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.
 

Offline charliex

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: 00
  • Car Hacker
Re: USB Connection
« Reply #5 on: July 11, 2010, 07:21:34 pm »
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.
 

Offline NJCTopic starter

  • Newbie
  • Posts: 7
    • MSP430 LaunchPad Blog
Re: USB Connection
« Reply #6 on: July 13, 2010, 09:10:34 am »
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/
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #7 on: July 13, 2010, 01:44:26 pm »
Has anyone ever achieved anything close to the 480Mbps? If so, using what?

as 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.
« Last Edit: July 15, 2010, 03:23:49 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: USB Connection
« Reply #8 on: July 13, 2010, 06:17:06 pm »
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
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #9 on: July 14, 2010, 11:10:26 am »
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
for the devices i own. its still a way off the 80% mark, something like 10-50% is more practical.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline charliex

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: 00
  • Car Hacker
Re: USB Connection
« Reply #10 on: July 14, 2010, 07:29:10 pm »
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.

 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #11 on: July 15, 2010, 01:47:48 pm »
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.
« Last Edit: July 15, 2010, 01:54:05 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9008
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: USB Connection
« Reply #12 on: July 15, 2010, 03:17:25 pm »
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.
Have you tried modifying the kernel module to work around the problem?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: USB Connection
« Reply #13 on: July 15, 2010, 08:22:45 pm »
Have you tried using the FT245 parallel interface version?

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #14 on: July 15, 2010, 10:44:49 pm »
Have you tried using the FT245 parallel interface version?
i 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.
« Last Edit: July 15, 2010, 10:46:46 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9008
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: USB Connection
« Reply #15 on: July 16, 2010, 01:35:45 am »
i 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.
USB 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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: USB Connection
« Reply #16 on: July 16, 2010, 01:51:05 am »
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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline charliex

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: 00
  • Car Hacker
Re: USB Connection
« Reply #17 on: July 16, 2010, 04:15:39 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf