ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
■ BY FRED EADY
CHATTING UP A THUMBDRIVE
I NEVER SEEM TO HAVE A USB FLASH DRIVE when I need one. So, when
I saw this great deal on some 8GB DRIVEs, I picked up a couple for around the
shop. I figured ITS SIZE was enough for just about any sneaker-net data
transfer job I'd have to do. Plus, the price was really good. Just last week
I came across another Internet gotta-have-it USB flash drive deal. This time,
I bit on some bargain 16GB flash drives.
As it turns out, I have plenty of USB Flash drives
to plug into this month's project. I've mounted a
VDIP2 and a PIC18LF2620 on a perfboard and plumbed
in some power. We're going to pick up where we left off
last time and put some C code together to access the
innards of that herd of USB Flash drives grazing on the
bench in my office.
Thanks to the PIC18LF2620's internal 8 MHz oscillator
block and its ability to operate at 3. 3 volts, the interface
■ PHOTO 1. Building up the VDIP2 hardware was a walk in
the park. To keep things as simple as possible, I didn't include
a five volt regulator circuit in the design. Instead, I opted
to use an off-the-shelf regulated five volt DC wall wart. The
VDIP2 does all of the power supply work, including providing
regulated 3. 3 volt power for the PIC18LF2620.
between the PIC18LF2620 and the VDIP2 is very simple
and clean. The VDIP2 is externally powered with five
volts. The VDIP2's on-board 3. 3 volt regulator supplies
the internal 3. 3 volts that the VDIP2's VNC1L IC requires.
The Microchip MCP1700 has enough headroom to
supply up to 200 mA of 3. 3 volt power to devices
external to the VDIP2. Take a look at Schematic 1 and
you'll see that the PIC and its supporting circuitry are
powered by this.
Note that the PIC18LF2620's EUSART and the VDIP2
serial interface are directly coupled. We eliminate the
need to translate the serial port logic levels by powering
the PIC with the same 3. 3 volt power rail required by
With the exception of the addition of some
debugging LEDs attached to I/O pins RC3, RC4, and RC5,
you have an abundance of PIC18LF2620 I/O to use
at your leisure. The VDIP2 multiplexes its
communications lines with its I/O lines, depending on the communications configuration you
select. We are configured for UART mode.
The VDIP2 I/O lines AD0 and AD1 flex from
bidirectional I/O to serial transmit and receive,
respectively. Just in case we'll need to
implement handshaking, I've pulled out the
VDIP2's RTS (Request to Send) and C TS (Clear
to Send) modem signals and terminated them
at the PIC18LF2620's RC0 and RC1 I/O pins.
For those of you that are not
communications experts, the DTE (Data
Terminal Equipment) device raises the RTS
signal when it wants to transmit. The DCE (Data
Communications Equipment) attached to the
DTE sees the RTS signal and raises its CTS
signal in response if all is clear for transmission.
The DTE and DCE terms refer to a host computer
which is the DTE device, and a modem which is