THE DESIGN CYCLE
■ SCHEMATIC 2. Maybe if I wait a bit
longer they'll roll the capacitors and
ESD diodes into the CP2103, as well.
With the Eval Kit, we have all of the necessary hardware to make a USB-to-RS-232 connection. However, not
one bit of data will transfer without the help of the Virtual
COM Port (VCP) driver. The Kit comes with a CD-ROM
which contains the VCP drivers, the CP2103 datasheet,
a User's Guide, application notes, the USBXpress
Development Kit application, and some example
software. The USBXpress Development Kit is intended for
those of you that wish to roll your own CP2103 based
application using Visual C++ or Visual Basic. Some very
useful CP2103 configuration utility programs are also part
of the USBXpress Development Kit package.
I loaded up the Windows VCP driver without incident.
Since our goal is to replace an old-fashioned piece of
RS-232 hardware with a new fangled piece of tiny USB
hardware in an embedded environment, I decided that a
good initial test of the CP2103's capabilities would be to
interface a WLAN Phoenix's RS-232 port to the Eval Kit.
The Phoenix/CP2103 lashup can be seen in Photo 2.
For those of you that are unfamiliar with the Phoenix, it is
a PIC18LF6722-based Wi-Fi device that was featured in a
previous edition of Design Cycle.
The Phoenix will transmit a menu via its RS-232 port
at power-up. If the CP2103 is really a candidate to be a
transparent replacement for the SP3232, I should be able
to fire up a Tera Term Pro terminal emulation session on
my laptop and receive the Phoenix's power-up menu
message from its RS-232 port by way of this new USB
interface. With that, I proceeded to the Windows Device
Manager to force the CP2103's VCP driver to lock into
COM1 of my laptop. I then invoked a Tera Term Pro
session on the laptop and set the terminal emulator for
COM1 operation at 57600 bps, which matches that of
the Phoenix's serial port. I powered up the Phoenix and
behold! The menu you see in Screenshot 1 appeared in
the laptop's Tera Term Pro emulator window. I've seen
enough. Let's lay the groundwork towards building up
some project hardware that incorporates the CP2103.
DESIGNING WITH THE CP2103
If you take a count of the actual electronic
components in Schematic 2, you can total them all on
the fingers of one hand. Let's see if we can figure out
what those five components are doing for us. All of the
CP2103 pins on the left-hand side of the schematic are
dedicated to the RS-232 interface with the exception of
the CP2103's GPIO pins, which we're going to ignore for
now. The datasheet tells us that all of the modem control
signal pins can be left disconnected if not used. Only the
TXD and RXD signal pins are excluded from optional
disconnection. So, let's begin with pin 6 of the CP2103
and work our way down the right-hand side of Schematic 2.
Pin 6 V of the CP2103 is interesting as it appears
that this pin can either supply power or receive it. The
■ SCHEMATIC 3. Adding a couple of inexpensive parts
is a small price to pay for circuit stability.
February 2009 71