Connect with us

Getting started with USB

Discussion in 'Electronic Basics' started by Arthur Rhodes, Mar 13, 2007.

Scroll to continue with content
  1. I have a project in mind to build a device with a USB interface.
    The device would store some data in an eeprom. There would be some
    synchronization software written for it and residing on a computer.
    When the device is plugged into a USB port on the computer the
    synchronization software would launch and send the most current
    data to the device, which would replace the data in the eeprom
    with this new data. Basically, a very common kind of paradigm,
    like a PDA or an ipod. Only, I'm only going to sync a fairly small
    amount of data, like 10KB or less.

    I'm favoring AVR microcontrollers programmed in C.

    My question is, where to start. What are the common USB interface
    chips people use for this? I'm looking for a cheap one, since the
    application is not demanding. I've seen USB interfaces selling for
    as much as $8.00 a pop, but I think that's too much for what I
    need.

    Some of the AVR microcontrollers have USB interfaces built in. That
    would be great, but I think they are geared toward more demanding
    applications and tend to be rather expensive. I just want something
    standard, cheap, and simple, if there is such a thing. Also, it
    would be nice if the tools for it are not necessarily tied to any
    one OS.

    Any pointers to an overview, or example projects, or anything to
    point me in the right direction would be very much appreciated.
     
  2. Noway2

    Noway2 Guest

    USB has a pretty steep learning curve associated with it. When I last
    looked, there were two books on embedded USB systems available, but
    there are probably more now. Those two were Jan Axelson's USB complete
    and another book, which I can't quite remember titled something like,
    "Everything you wanted to know about building USB peripherals".

    To get started, I would suggest getting a book on USB and trying to
    learn about how the protocol works. It has a lot of subtleties,
    nuances, and sub protocols that make it an intense topic.
     
  3. Check out the series of USB interfaces from FTDI ( www.ftdichip.com ).
    They handle the low level protocol for you and give various high level
    interfaces. The one I am using with great success is the FT232RL which
    exploses a TTL UART interface that is perfect for interfacing with an
    AVR (which is how I use it).

    You can get the chips pretty cheap at SparkFun (
    http://www.sparkfun.com/commerce/product_info.php?products_id=650 ) if
    you can manage to solder a SSOP-28 and they also offer a breakout board
    that makes development a lot easier (
    http://www.sparkfun.com/commerce/product_info.php?products_id=718 )

    That chip is great because it has royalty free drivers available for
    Windows, Mac OS and Linux and you can use them either as a virtual COM
    port or in direct access mode. If you use the virtual COM port mode you
    can easily have a USB interface up and running in a matter of an hour or
    two.

    Good luck!

    Jason von Nieda
     
  4. Bruce

    Bruce Guest

    I haven't done any USB projects with the AVR yet, but I have started a
    project page here http://www.rentron.com/PicBasic/PIC_USB.htm for
    one with the PIC18F4550.

    I haven't had time to finish the project page, but working VB & PIC source
    files are available in .zip format on the page, with links to other references.


    Regards,

    Bruce
     
  5. Thanks for the tip. I like the cross platform support and the simple
    serial interface. Four dollars is still more than I expected a USB
    interface to cost, but it's better than $8.

    I came across an FT232R mounted for easy use with breadboards here:
    http://www.smileymicros.com/index.p...er_op=view_page&PAGE_id=31&MMN_position=57:57
    Looks like it would be convenient for experimenting.
     
  6. Thanks. I took a look on Amazon. As far as I can tell, Jan Axelson is
    still the leader, so I have the USB Complete book on order.

    She also has a book called USB Mass Storage. I'm wondering if I might
    be able to just use the standard mass storage drivers for my
    application. I don't want my device appearing as a new drive to end
    user, but if my syncing application can treat it that way, it would
    make things pretty simple.
     
  7. jasen

    jasen Guest

    Some people have managed to interface a ATtiny2313 (cheap 20 pin
    microcontroller) directly with a USB port using bit banging (software
    implementation of the USB protocol) 1.5Mb/s assembler source is out
    there. should bre adaptable to any AVR that can do 12MHz

    Bye.
    Jasen
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-