THE DESIGN CYCLE
drive is present and when the thumb drive is removed.
We’ll need to code for those events. We’ll also need to
code some file handling routines to open, close, read, and
write files on the thumb drive.
THE PLAN
As you can see, we still have lots of work to do
before we can relish in the success of adding host USB
functionality to a PIC. I also would like to exercise the
VNC1L’s I/O lines as they are an extension of the PIC’s
I/O subsystem. So, that means I’ll be
sharing some code with you to push
and pull bits on the VNC1L’s I/O
pins. My plan is to plant a VDIP2
and a PIC on a breadboard and
work out their “differences.” Once I
have a stable hardware design that
works flawlessly with the firmware
design, I’ll transfer the hardware
design from breadboard to printed
circuit board. If all goes as planned,
our next discussion will revolve
around reading and writing thumb
drive files and taking advantage of
the rest of the VNC1L’s USB host
capabilities. I like to write code that
is easy to follow and portable to
other compilers and languages. So,
I’ll write the code using the HI-TECH
PIC- 18 PROC compiler. I also don’t
like to rope you into a particular PIC
if the application doesn’t demand it.
I’ll use the PIC18LF2620 in my
design. However, you can use any
PIC microcontroller that supports an
integral UART or EUSART that is
backed up by an interrupt
subsystem.
Next time, I’ll provide a
complete set of microcontroller
API functions and hardware design
details that will enable you to put
a VNC1L and USB into your
Design Cycle. NV
The Newest Products and
Technologies are Only a Click
Away!
mouser.com
■ Fred Eady can be contacted via
email at fred@edtp.com
SOURCES
FTDI — www.vinculum.com
VNC1L; VDIP2; Vinculum Firmware
HI-TECH Software —
www.htsoft.com
HI-TECH PIC- 18 PRO
• Over A Million Products Online
• More Than 366 Manufacturers
• Easy Online Ordering
• No Minimum Order
• Fast Delivery, Same-day Shipping
(800) 346-6873
The Newest Products
For Your Newest Designs
Microchip — www.microchip.com
PIC18LF2620
Mouser and Mouser Electronics are registered trademarks of Mouser Electronics, Inc. Other products, logos, and
company names mentioned herein, may be trademarks of their respective owners.
December 2008 21