The Serial Port is Dead!
Long Live the Serial Port!
USB Serial Port
the FTDI FT232R
by Joe Pardue
In ancient times, when the King died the
people shouted, “The King is dead — long live the
King!” to acknowledge the passing of the old regime and to
welcome in the new. You may have noticed the demise of the old
serial port King and its replacement by the USB usurper. If you have used
the RS-232 serial port to work with embedded systems, you likely mourn the old
King and tend to think of the new King (USB) as something of a tyrant — or at least very hard
to figure out and use. But with the advent of USB-to-serial adapter ICs such as those from
SiLabs and FTDI, we have something to celebrate, and we can shout, “The serial port is dead
— long live the serial port!” We can now use our old methods and not have to learn a thing
about USB other than how to plug in the cable.
In this article, we will look at the FTDI FT232R USB
UART IC mounted on a small PCB — the BBUSB. This
board lets us use USB as an old style serial port on a
breadboard. As a bonus, we will be able to do general-purpose Input/Output with 14 lines of the FT232R in the
bit-bang mode. We will first learn to use BBUSB as a
USB-to-serial port converter talking to a PC with a
simple terminal program. Next, we will learn
about the bit-bang mode and how to use the
FT232R to read switches, light LEDs, and finally,
we will build the “World’s Smallest Moving
Message Sign” using a single seven-segment LED.
The executables for all the software used in this
article may be downloaded for free from smiley
micros.com or from the Nuts & Volts website
( www.nutsvolts.com). The source code for the
Simple Terminal program is also available for free,
written in both C# and Visual Basic .NET Express
Using the BBUSB and Simple
In Figure 1, we see the Smiley Micros BBUSB
and layout with pin names. In Figure 2, we see
the BBUSB schematic that shows the components
and wiring used.
Using USB Bus Power
The USB bus can provide up to 500 mA
power to a USB device, but certain rules must be