USB DEVICE CONTROL
by Alexander Enzmann
USB interfaces are now the dominant port available on PCs, with
several available on nearly all machines. With the parallel port
nearly gone and typically just a single serial (RS232) port available,
simple ways to control devices through USB have become essential.
This article describes an
inexpensive way to interact with devices using
Microchip’s PIC 18F2455
microcontroller. The total
cost to get started with USB is
under $15, with about half of the
cost associated with the micro-controller chip itself.
This is not intended to be a
tutorial on the nitty-gritty details
of USB — there are plenty of
resources for that. The intent is to
provide enough hardware and
software so that you can actually
start building things, rather than
spend weeks reading manuals.
You will end up spending plenty
of time learning USB — hopefully
the code provided with this article
will flatten out the learning curve
The PIC 18F2455 (and
siblings 2550/4455/4550) has the
basic hardware support for low-and full-speed USB (no high
speed). For most device control
applications, this will be more
Alternatives such as USB to
RS232 converters exist in both
All software and firmware files are available
on the Nuts & Volts website at www.
nutsvolts.com under the name “USB.zip.”
FIGURE 1. Schematic
of simple USB device.
June 2006 73