ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
■ BY FRED EADY
OLDER LANGUAGE, NEWER INTERFACE
C IS A VERY VERSATILE PROGRAMMING LANGUAGE. However, it’s a sure bet
that there are plenty of you out there that work wonders with the Basic
programming language. Believe it or not, I can write Basic programs too, but
being able to cobble together tricky Basic statements is useless without
hardware that is capable of converting those words into real world actions.
So, this month we’re going to design and assemble the hardware necessary
to support a powerful Basic language variant: ZBasic. In the process, we’re
also going to add another USB device to your Design Cycle.
ANOTHER USB INTERFACE IC
In a previous edition of Design Cycle, we explored the
virtues of the Silicon Laboratories CP2102 and CP2103
USB-to-UART-bridges. For the ZBasic USB hardware, we’re
going to jump ship and row across the bay to the FTDI
camp. The CP210X devices are perfect for general-purpose USB to RS-232 conversions. When it comes to
the ZBasic hardware platforms, the FTDI FT232R USB
UART IC is a better fit.
Like the Silicon Laboratories USB interface ICs, the
FT232R is a single chip solution that encapsulates the USB
protocol. If you had the opportunity to participate in our
CP210X discussion, you’ll recall that I really liked the
simplicity of the CP210X supporting circuitry. The FT232R
follows suit in that department. The FT232R integrates the
USB termination resistors, the clock, the crystal, and
configuration EEPROM. Data rates between 300 bps and
3 Mbps are supported by an internal 256 byte
receive buffer and 128 byte transmit buffer.
The FT232R is also considered a “drop-in”
replacement for the industry standard RS-232
conversion ICs and is suitable for use with the
RS-232, RS-485, and RS-422 protocols. Like
anything complicated, it is often best to understand smaller subsystems to gain a working
knowledge of the complete system. So, we’ll
examine the FT232R as groups of associated
pins. Let’s take a walk around the FT232R
USB UART IC using Figure 1 as a guide.
THE USB INTERFACE GROUP
Pins 15 and 16 form the FT232R USB UART IC’s USB
interface. The USBDP (USB Data Signal Plus) input is
supported by an internal series and pullup resistor pair. The
same configuration holds true for the USBDM (USB Data
Signal Minus) pin with the exception of the pullup resistor.
THE POWER GROUP
The FT232R USB UART IC’s pin 4 is used to
determine the output drive levels of the UART interface
and the CBUSx pins. When the FT232R is used in a USB
bus powered circuit, we can tie the VCCIO pin to the
3V3OUT pin to drive the outputs at + 3. 3 volt levels.
Otherwise, tying the VCCIO pin to VCC (+ 5.0 VDC) will
result in an output drive level of + 5 volts. The FT232R can
also be persuaded to drive its outputs as low as +1.8 volts
■ FIGURE 1. The FT232R USB UART IC looks busy
here. However, it doesn’t take much to use it to
build a simple RS-232 to USB converter. The
secret to the FT232R IC’s success is that it is just
as configurable on the inside as it is on the outside.
April 2009 15