FTDI vs built-in USB

Discussion in 'Embedded Systems and Microcontrollers' started by ActivePower, Jan 7, 2014.

  1. ActivePower

    Thread Starter Member

    Mar 15, 2012
    155
    23
    I am looking to incorporate USB in a forthcoming project and I was wondering which is a better implementation: a UART-to-USB bridge like FT232/CP2102 chipsets or a built-in USB peripheral?

    The application would have to move around bulk data to the PC quickly as I have A/D conversions running in the background. I figure a built-in peripheral would be faster and cheaper overall but won't this affect the CPU workload?

    FTDI is a lucrative option but won't it just introduce another potential bottleneck by introducing another link? Are there any good advantages to justify using an additional chip (I have plenty of board space though so that isn't a major consideration).


    Thanks.
     
  2. JohnInTX

    Moderator

    Jun 26, 2012
    2,339
    1,022
    Personally I'd stick with the USB peripheral on the chip. I've used the FD232 and it works fine but its one more thing to buy and support.

    I don't know what your throughput actually requires but the FD232 has some buffering that would help but as you say, its another thing in the signal path. I think the CPU workload would be about the same. Both approaches eventually require getting the same data out of buffers via IRQ service and doing something with it.
     
  3. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    One thing to be aware of is the totally practical issue of how long it'll take you to get this working, depending on your level of knowledge. The FTDI chips are extremely easy to get into operation, with a UART connection on the processor side and a software interface that simulates a UART on the computer side. At least that's true for the FT232R chip that I've used. With a USB-equipped processor, I'd worry about how to get it working both in the processor's code and on the computer side. Maybe I'm intimidated because I've never done it that way, but my suggestion is that you have a plan for programming it. If you can do that, please tell me!
     
    absf likes this.
  4. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    John makes a very good point.

    I am using an STM32F4 chip with on board USB. I don't know to program it for USB operation. Meanwhile I have been using CP2102 for many years and I know how to get UART interface to MATLAB working. I don't know how to use USB with MATLAB.

    The solution for me is simple. Continue to use the CP2102 until I learn how to use USB. I can run the CP2102 at 500k baud which is fast enough for my application.
     
    absf likes this.
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The benefit with the FTDI chips. Are that USB drivers are available. If you are not experienced in writing USB drivers. This may be a very attractive
     
    ActivePower, absf and Brownout like this.
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The need for a custom driver is driven by designing some custom protocol. Human Interface Devices (HUD) like mice or keyboards come standard in Windows, as does virtual COM ports.
     
  7. ActivePower

    Thread Starter Member

    Mar 15, 2012
    155
    23
    Thanks for all the replies. I read up a little more on available methods of implementing USB.

    While PICs do have excellent USB-enabled controllers in DIP packages, they are not easily
    available here.
    AVRs have a couple of low-end controllers in SMD (ATMega32u4 etc.) but soldering them might be a job I'm not up to yet (there are no locally available breakout boards I'm aware of). Although, AVRs have good software libraries for implementing USB (LUFA).

    Also drivers might be a problem. Since this is my first time dabbling with USB, I'd prefer to take the safer route by getting an FTDI breakout board at least for prototyping. I thought if all goes well, I'd try the USB-MCU thing too.
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    I get all my breakout boards thru Ebay from China. AFAIK China is way closer to India then to the USA. ;-)
     
    ActivePower likes this.
  9. ActivePower

    Thread Starter Member

    Mar 15, 2012
    155
    23
    Is it? :-D
    I've never bought stuff off eBay yet. Maybe I'll give it a shot this time. Although the Dollar - Rupee conversion rate isn't very encouraging, I must say.
     
Loading...