FTDI UB232R USB - RS232
Converter Modules
I wanted to attach one of my projects to my computer using a USB port. At first I tried the LIBUSB program in the computer and V-USB
in the project. This worked great -- until I upgraded my computer from
XP to Win7. Oops -- no LIBUSB driver for Windows 7*. After banging my
head against the wall and receiving numerous blue screens for my
efforts, I gave up on it. Not only did LIBUSB not work but my old and
trusty USB to serial adapters** did not work anymore either.
Then I remembered FTDI. One
of my PIC programmers used an FTDI chip inside so it could be USB
attached. I was reluctant to use their chips because they are all
surface mount, and really tiny ones at that. However after reviewing
their web site I found that they have a number of evaluation modules,
many with DIP headers. I settled on the UB232R.
It is a tiny, minimalist module that is easy to directly interface to a
microprocessor's USART. I was even more pleased to find it readily
available from Digikey, p/n 768-1022-ND, for around C$19.50.

Yes
that's a USB mini-B connector and the module isn't much larger than
that. And the header sockets come with the module. This module doesn't
give you all the RS-232 signals, just TxD, RxD, RTS and CTS. (If you
need more signals, look at the UM232R.) I interfaced TxD and RxD to the USART of a ATmega8 and had it running on the 1st try.
The great thing about using FTDI chips is the PC drivers. They can
be downloaded from their site, but install automatically from the
internet, at least under Windows 7. The drivers are up-to-date, no
issues of "sorry supports XP only" (or better yet, "we're not telling
you what we support, take a chance"). And if you program the PC, there
are two interfaces available, the traditional Serial Port interface
(VCP or Virtual COM Port), and a direct programming interface (D2XX
Direct Drivers). Both interfaces are installed and available but only
one can be used at a time. Use Windows Device Manager to find out what
COM port number has been assigned to the driver.
If you choose to develop a project using an FTDI interface, download the D2XX driver package. You will need ftd2xx.h and ftd2xx.lib to compile your host program.
* As of mid-2010 LIBUSB claims to support Windows Vista/7 experimentally,
but commentary on their web page indicates that this is wishful
thinking. Others claim that installing the driver in XP compatibility
mode works but it did not work for me. My experience with my old
serial/usb adapters was that in a dozen tries, I got one adapter to
actually work once, if only temporarily, so perhaps people are having
similar experience with LIBUSB. More likely, you will get the BSOD for using an incompatible driver.
-- Update March 2012 -- LIBUSB-WIN32 now claims Vista and Win7 compatibility. Perhaps I'll give it another try sometime.
** Speaking of serial/usb adapters, FTDI has some of those too! I tried a US232R-10 and a UC232R-10
(DigiKey p/n 768-1013-ND and 768-1014-ND respectively) and they both
work great. As with the UB232R, drivers are found when you attach the
adapter.
Tip
1: If you use several virtual com ports like me, it may be useful to make
a note of each one and the device it is associated with. This helps
avoid the head-scratching to the question which COM port does my application use?
Tip
2: Don't update your FTDI driver with Windows Update unless you
followed Tip 1. I have experienced a problem where all the FTDI managed
com ports were all assigned new numbers after the update and none of my apps
worked. Anyway if everything is working fine, then a driver update is probably
unnecessary.
Update October 26, 2014 - FTDI released an update of its driver which bricked "fake" FTDI chips.
For this reason I do not recommend buying these items from China.
Apparently some of them use FTDI's VID and PID codes, which they should
not do.
Update
November 2015 - You can get inexpensive project boards with
processor and FTDI or other chip from suppliers like Sparkfun, which may be an easy way to get going on a project, often for no more than the UB232R FTDI adapter alone. For example, this one, only US$8.00.
VE3LNY's
Electronics Notebook Page