Google Analytics

Notices

USB INTERFACE ICs, The FTDI FT232R

The FTDI FT232RL SMD package

The FTDI FT232RL SMD package

Lets look at the FTDI series of components for USB Interfacing. The CP210X devices are perfect for generalpurpose USB to RS-232 conversions. When it comes to the Arduino, AVR and PIC 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. The main feature of the FT232R is that it integrates the USB termination resistors, the clock, the crystal, and configuration EEPROM all into one convient package. It can support data rates between 300 bps and 3 Mbps, internally, there is an internal 256 byte receive buffer and 128 byte transmit buffer to ensure that the flow of data remains uninterrupted. 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.

ft232rl_block

Lets examine this chip by its functional groups. Figure 1, a diagram of the pin-outs of the chips will serve as a guide to this task.

Features

  • Single chip USB to asynchronous serial data transfer interface.
  • Entire USB protocol handled on the chip – No USB-specific firmware programming required.
  • UART interface support for 7 or 8 data bits, 1 or 2 stop bits and odd/even/mark/space/no parity.
  • Fully assisted hardware or X-On / X-Off software handshaking.
  • Data transfer rates from 300 baud to 3 Megabaud (RS422 / RS485 and at TTL levels) and 300 baud to 1 Megabaud (RS232).
  • FTDI’s royalty-free VCP and D2XX drivers eliminate the requirement for USB driver development in most cases.
  • In-built support for event characters and line break condition.
  • New USB FTDIChip-ID™ feature.
  • New con?gurable CBUS I/O pins.
  • Auto transmit buffer control for RS485 applications.
  • Transmit and receive LED drive signals.
  • New 48MHz, 24MHz,12MHz, and 6MHz clock output signal Options for driving external MCU or FPGA.
  • FIFO receive and transmit buffers for high data throughput.
  • Adjustable receive buffer timeout.
  • Synchronous and asynchronous bit bang mode interface options with RD# and WR# strobes.
  • New CBUS bit bang mode option.
  • Integrated 1024 Byte internal EEPROM for storing USB VID, PID, serial number and product description strings, and CBUS I/O con?guration.
  • Device supplied preprogrammed with unique USB serial number.
  • Support for USB suspend and resume.
  • Support for bus powered, self powered, and high- power bus powered USB con?gurations.
  • Integrated 3.3V level converter for USB I/O.
  • Integrated level converter on UART and CBUS for interfacing to 5V – 1.8V Logic.
  • True 5V / 3.3V / 2.8V / 1.8V CMOS drive output and TTL input.
  • High I/O pin output drive option.
  • Integrated USB resistors.
  • Integrated power-on-reset circuit.
  • Fully integrated clock – no external crystal, oscillator, or resonator required.
  • Fully integrated AVCC supply ?ltering – No separate AVCC pin and no external R-C ?lter required.
  • UART signal inversion option.
  • USB bulk transfer mode.
  • 3.3V to 5.25V Single Supply Operation.
  • Low operating and USB suspend current.
  • Low USB bandwidth consumption.
  • UHCI / OHCI / EHCI host controller compatible
  • USB 2.0 Full Speed compatible.
  • -40°C to 85°C extended operating temperature range.

The USB Signals

To begin with, pins 15 and 16 form the USB interface to the FT232R USB UART. 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. Basically, that is all there is to a USB host side interface… Just your power supply lines (+5v and ground), DataSignalPlus and DataSignalMinus.

Pin Name Cable color Description

The USB A & B Connectors...

The USB A & B Connectors...

1 VCC Red +5 VDC
2 D- White Data -
3 D+ Green Data +
4 GND Black Ground

The Power Pins

The FT232R 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. This IC can also be persuaded to drive its outputs as low as +1.8 volts by supplying the VCCIO pin from an external regulated supply. The only rule that must be followed for the low voltage external reference supply is that it is obtained from a regulator that is fed from the original VCC bulk supply. The voltage on the 3V3OUT pin is a product of the FT232R’s integrated LDO (Low DropOut) regulator. In addition to supplying a reference for the VCCIO pin, the LDO regulator is there to provide +3.3 volts to the USB transceiver module and feed the USBDP pullup resistor. If the current requirement is kept below 50 mA, you can use the 3V3OUT voltage to power external circuitry. We must supply at least +4.0 volts to the VCC pin to utilize the UART IC’s internal clock generator. This requirement is easily met by feeding the VCC pin from the USB interface’s VBUS signal.

The UART Interface and the CBUS group

The UART interface signals are defined as follows:

TXD Transmit Data Output
DTR Data Terminal Ready Output
RTS Request To Send Output
RXD Receive Data Input
RI Ring Indicate Input
DSR Data Set Ready Input
DCD Data Carrier Detect Input
CTS Clear To Send Input

In most cases, we only employ the services of TXD, RXD, and DTR signals.

There are five configurable CBUS I/O lines (CBUS0- CBUS4). The I/O function of each CBUS line is configured using the IC’s internal EEPROM. The CBUS0 and CBUS1 can be configured as the transmit and receive LED drive lines, CBUS4 can be used to indicate that the FT232R is in its SLEEP condition, which is analogous to a USB SUSPEND state. Any of the CBUS I/O pins can be configured as the active-low transmit enable line (TXDEN) in an RS-485 application. The same is true for power control. All of the CBUS I/O lines have the option of being configured as PWREN (Power Enable) pins. In the PWREN mode, the selected CBUS pin is used to drive an external P-channel MOSFET switch. It is recommended that devices requiring high current levels be switched using the PWREN signal and associated circuitry.

The Miscellaneous Group

There’s not much to say about this set of pins as most of them are not connected in our hardware design. Our design ties the active-low RESET input to VCC with a 100K pullup resistor. Otherwise, the TEST pin is grounded as per the datasheet and the OSCO and OSCI pins are left unconnected.

To use an FT232R circuit consists of two tasks. First is the task of hardware design. There are a number of hardware configurations that the IC can assume. Since we’re designing around a USB interface, it is probable that we will want to eliminate the need for an external regulated power supply. All we need is a trio of capacitors (C1-C3) and the ferrite bead (FB1) are mounted to suppress EMI. The ferrite bead helps reduce the noise that is radiated down the USB cable. The power supply source (VCC) for the entire design is taken from the USB VBUS interface pin. Capacitors C4 and C5 are acting as power supply filter capacitors. Extracting power from the VBUS line is fine as long as we don’t exceed 500 mA of total drain and keep initial connection current drain less than 100 mA. You may also need to create a way by which you can select the FT232R’s output drive voltage, while all of the UART interface signals can be terminated to a set of solder pads, or a pin header.

As usual, a little bit of eye candy does not go astray, and you can use a bi-colour LED to indicate data transmit and receive. Of course if your design is to be burried in a anonymous block of plastic, you can ommit the data transmit and receive LEDs. The UART interface to the ZBasic module consists of only three lines. This interface is easily realized due to the FT232R’s ability to morph the polarity of its UART interface.

Once you have the hardware part figured out and configured/built, we can access the internal configuration EEPROM of the FT232R. Following the assembly of the USB interface, the next step is to load up the FTDI PC driver for the IC. You can download this from the FTDI site. Once you get the FT232R driver loaded, I suggest forcing the COM port setting for the USB interface to a specific COM port (I use COM2). To do this with Windows XP, right-click on My Computer, select Manage, and Device Manager. For instance, after connecting my laptop to the prototype board, the FT232R driver initialized with a COM9 serial port interface. I highlighted the COM5 declaration as shown in Screenshot 1 and right-clicked on it. That took me to a menu containing Properties, which I clicked on. Once in the COM5 Properties window, I selected the Port Settings tab and clicked the Advanced button. At this point, select COM2 and proceed. Back out and perform all of the steps again beginning with right-clicking on My Computer. You should now have COM2 assigned in the Computer Management window. With the USB hardware checked out, the FT232R driver loaded, and the desired COM port dialed in, we can download an application called MProg from the FTDI website. The MProg application runs on your PC and provides a view into the FT232R USB UART IC’s configuration EEPROM. The first time I ran MProg, I opted to load the Default.ept file. After loading that configuration, I transferred from Program Mode to Edit Mode and modified the default template to meet the my requirements. MProg gives us the opportunity to alter the polarity of the UART signals and the functionality of the CBUS I/O lines. To push this configuration into the FT232R we simply save this group of settings and re-enter Program Mode.

And simply speaking, that is all there is to it, you can connect your USB UART to any MCU based circuit to which you need to connect a PC for data communications or programming.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>