Getting started with USB

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
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.
Reply to
Arthur Rhodes
Loading thread data ...
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.
Reply to
Check out the series of USB interfaces from FTDI (
formatting link
). 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 (
formatting link
) if you can manage to solder a SSOP-28 and they also offer a breakout board that makes development a lot easier (
formatting link
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
Reply to
Jason von Nieda
"Arthur Rhodes" wrote in;..
I haven't done any USB projects with the AVR yet, but I have started a project page here
formatting link
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.
Reply to
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:
formatting link
Looks like it would be convenient for experimenting.
Reply to
Arthur Rhodes
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.
Reply to
Arthur Rhodes
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
Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.