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
Any pointers to an overview, or example projects, or anything to
point me in the right direction would be very much appreciated.
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.
Check out the series of USB interfaces from FTDI (
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 (
you can manage to solder a SSOP-28 and they also offer a breakout board
that makes development a lot easier (
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
Jason von Nieda
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:
Looks like it would be convenient for experimenting.
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.
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