usb host

Discussion in 'Computing and Networks' started by kiranag, Dec 3, 2009.

  1. kiranag

    Thread Starter Member

    Apr 14, 2009
    12
    0
    Hi everyone,
    Can you please help me giving some ideas about programming a device which can act as usb host just like our PC?
    That would be really helpful.
    I will be waiting for your reply.
    Thanks
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    There are a number of micros that support USB hosting, however, on a PC, the port runs within the OS environment, so you would have to emulate that environment, which is typically far beyond the capabilities of any micro. You could however run a subset of the port functionality for specific tasks.
     
  4. ftsolutions

    Active Member

    Nov 21, 2009
    48
    2
    The protocol stack and management code for a host functionality typically requires at least 64K bytes of code space, so only the larger microcontrollers have the flash code space available to do this function. The USB OTG (On the Go) functionality is a hybridization of host and slave/device functionality which is tailored to (somewhat) smaller systems (smaller than a PC anyway) which must be either a host or a target device, depending on what they are plugged into (such as cell phones, cameras, etc.) One can purchase code stacks from various 3rd party vendors, or else read the specs and spend ~ 6 months writing your own code. The 3rd party code requires some sort of commercial OS to run it, otherwise again you are doing code customization.

    alternatively, for lower volume embedded products, I've used the Vinculum chip from FTDI (embedded RISC processor with various USB stack code programming options) to handle the USB heavy lifting, and just talk to it via serial interface or parallel/FIFO. Works pretty well if you need to get to market quickly or you won't want to invest in a large micro in the product for the code space/processing requirements..
     
Loading...