Shop OBEX P1 Docs P2 Docs Learn Events
Native USB vs. USB to RS-232 interfaces help please? — Parallax Forums

Native USB vs. USB to RS-232 interfaces help please?

grasshoppergrasshopper Posts: 438
edited 2008-06-10 16:51 in Propeller 1
I designed a complex device that controls temperature using the propeller at its core. Included in the design is the FTDI USB to RS232. We have sold a few hundred and the future is looking very bright. My problem is that recently a customer asked me to use a new USB IC. He claims that the FTDI IC is not a native USB device. This is because he is controlling other devices that also use USB and his code is written in JAVA. He stated that COM-port style RS-232 interfaces, is inadequate because native USB will open a device and perform bulk transfers, specifying bytes to write and a number of bytes to read on each transaction.

Could some one elaborate on the differences and or point me towards correct decimation that may help me.

Comments

  • BradCBradC Posts: 2,601
    edited 2008-06-09 18:21
    The FTDI IC *IS* a Native USB device. They provide two drivers. One is a Virtual COM port driver (which we all use to program the propeller) and the other is a .dll you can link in to talk to the chip at a lower level. Have a good look at the FTDI web site, they have loads of information there.

    What I don't get is "He stated that COM-port style RS-232 interfaces, is inadequate because native USB will open a device and perform bulk transfers, specifying bytes to write and a number of bytes to read on each transaction." .. why do you need such fine grained control over the communications channel? is there a requirement I'm missing?

    If you wanted to, you could actually talk to the FTDI device directly with libusb, using that to configure it (endpoint 0) and then transfer data to and from it (endpoint 1), but why indulge in such masochistic behaviour when there is a perfectly good driver available?

    I'd go so far as to say your customer is being overly difficult [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-09 18:22
    Jan Axelson's "USB Complete" http://www.lvr.com/ is one of the more accessible USB references.

    Basically, using a USB to serial RS232 converter makes for a VERY simple USB installation. The RS-232 signalling rates are quite low compared to what USB could do. Your customer is correct in this.

    However, you also have to look at the solution domain. How much data really HAS to transfer back and forth for your hardware to work? If you were creating a USB hard-drive, then yes, you'd want to use the highest speed USB modes you could. But if 115 KBaud is good enough for what your hardware has to do, then spending the additional time and trouble of getting a higher speed USB IC to work probably has very low ROI. And the off-the-shelf FTDI solution is VERY cost effective.

    Some engineers tend to be perfectionists, "gold-plating" parts of the solution when gold-plating really isn't needed. If your customer has created other USB interfaces in Java, certainly opening a serial port in Java should be trivial for him. Why spend a few tens of thousands of dollars getting a new interface working, when you already HAVE an interface that solves your problems?
  • BradCBradC Posts: 2,601
    edited 2008-06-09 18:29
    allanlane5 said...

    Basically, using a USB to serial RS232 converter makes for a VERY simple USB installation. The RS-232 signalling rates are quite low compared to what USB could do. Your customer is correct in this.

    The FTDI chips will run up to 2M for the serial model and about 4M for the FIFO.. so speed is rarely a limiting factor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • grasshoppergrasshopper Posts: 438
    edited 2008-06-09 19:08
    Thanks everyone but i am now really curious between the different types. Are there even different types?
  • schillschill Posts: 741
    edited 2008-06-10 11:47
    Keeping the serial interface means that many more people will be able to interface to your device. It is relatively simple to create serial interfaces in code in just about any language and operating system (at least OSs that support the FTDI (for example) drivers).
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-10 14:20
    Okay, but USB 1.1 will go to 33 MBits/Sec, and USB 2.0 will go to 480 MBits per second. So I think the statement that the FTDI chips are not using all the possible bandwidth is still correct. BUT, the issue is STILL "how much bandwidth do you NEED for your application", not gold-plating your solution to support the absolute highest throughput USB supports.

    I agree with your conclusion, though. "Speed is rarely a limiting factor".

    Edit: Right, USB 1.1 goes to 12 MBit per second -- My bad.· Which is STILL higher than the FTDI 4 MBit/second, so the point stands.

    Post Edited (allanlane5) : 6/10/2008 5:59:54 PM GMT
  • ForrestForrest Posts: 1,341
    edited 2008-06-10 16:51
    USB 1.1 can run at a maximum of 12 Mbps en.wikipedia.org/wiki/USB
Sign In or Register to comment.