DESIGNCYCLETHE
ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
■ BY FRED EADY
TAKING USB DOWNSTREAM
Up to this point, we’ve been working our USB device magic on an upstream
connection to a USB host. The time has come to take on USB host
responsibilities and originate a downstream connection from the Type A USB
connector of a USB host we will design and assemble. We’ve covered USB
fundamentals in past Design Cycle conversations. So, if we run across a USB-related tidbit that needs clarification, we’ll take care of that business as we
find it. Our mission is to gain enough knowledge to design, build, and
program a piece of embedded USB host hardware.
THE USB HOST CORE DEVICE
FTDI has established a reputation of delivering easy to
deploy USB functionality to our little world of
microcontrollers. So, it stands to reason that our USB host
project will be anchored on a USB integrated circuit
produced by FTDI. For those of you not familiar with the
term “FTDI,” it is short for Future Technology Devices
International. There’s a good chance that the RS-232-to-
USB converter dongle you plug into your laptop or
desktop PC is loaded with an FTDI USB-to-RS-232
converter IC (such as the FT232R USB UART IC).
FTDI USB devices (such as the FT232R) are intended
to be integrated into new USB designs, as well as legacy
RS-232 designs. In the case of RS-232 designs, parts like
the FT232R are designed to transparently replace the RS-
232 hardware. Utilizing an FTDI USB-to-UART device does
not require the user to write any USB driver code as the
FTDI device emulates the RS-232 hardware it displaced.
All of the USB responsibilities (including the USB physical
hardware and USB logic) are encapsulated within the
FT232R USB UART IC.
Our USB host project will revolve around the brand
new FTDI Vinculum-II Embedded Dual USB Host
Controller IC which is more than just a platform that
supports host USB operations. The Vinculum-II can also be
programmed to run an application in addition to handling
USB host duties. In many ways, the Vinculum-II looks and
acts like a microcontroller. We recently discussed the
PIC24FJ256GB106’s peripheral pin select feature which
54 August 2010
allows the programmer to assign the PIC’s peripherals to
alternate sets of I/O pins. Guess what? The Vinculum-II’s
on-chip VNC2 IOMux performs the identical pin
assignment duty for the Vinculum-II peripherals.
A programmable 3 Mbaud UART and a pair of SPI
portals add to the Vinculum-II controller IC’s
microcontroller feel. Three 16-bit counters are available to
us with a fourth 16-bit timer dedicated to the RTOS (Real
Time Operating System). The available 16-bit count-down
timers can be configured for one shot or auto-reload
operation with an option to interrupt on zero. The
Vinculum-II’s 16-bit timers also play a major part in the
generation of PWM signals which can stream from any or
all of the Vinculum-II’s eight PWM outputs. The SPI portals
and UART cover the Vinculum-II’s serial I/O capabilities
while an eight-bit wide FIFO interface handles the parallel
interface duty.
As you would expect, the I/O peripherals are
supported by 128K x 16 of E-Flash program memory and
4K x 32 (16K x 8) of data RAM. Judging from the bit
width assigned to the timers, program Flash, and data
RAM, the Vinculum-II is a 16-bit device. In fact, it is
indeed a 16-bit device that employs Harvard architecture.
Harvard architecture places the program memory and
data memory in separate data spaces.
There are three Vinculum-II variants with differing
numbers of available GPIO pins. Our design will use the
largest Vinculum-II variant which is housed in a 64-pin
package that puts 44 GPIO pins at our disposal. There is
also a 32-pin Vinculum-II part that supports 12 I/O pins
and a 48-pin part which exposes 28 I/O pins.