Technical Note TN_103. FTDI USB Data Transfer Efficiency

Similar documents
Future Technology Devices International Ltd. AN232R-02 FTDIChip-ID for the FT232R and FT245R

Application Note. AN_136_Hi-Speed Mini Module EEPROM Disaster Recovery

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

Application Note AN_149. Upgrading a passive DB9 RS232 Interface to an active USB Interface using an FTDI DB9-USB-RS232 Module

Future Technology Devices International Ltd. USB-Key. Datasheet

Determining USB Peripheral Device Class

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows VISTA

Application Note AN_385. FTDI D3XX Driver Installation Guide

Application Note AN_243. FT312D USB Host to UART Cable Application

Technical Note. TN_134 FTDI Android D2XX Driver

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Simplified Description of USB Device Enumeration

Future Technology Devices International Ltd. Windows XP Installation Guide

Technical Note TN_152. USB 3.0 Compatibility Issues Explained

White Paper WP_001. Connecting Peripherals to an Android Platform

Future Technology Devices International Ltd. Technical Note TN_101

Command Processor for MPSSE and MCU Host Bus Emulation Modes

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows 7

Future Technology Devices International Ltd

Application Note AN_241. FTDI_AOA_HyperTerm_User_Manual

Future Technology Devices International Ltd. Windows 2000 Installation Guide

Application Note AN_242

Future Technology Devices International Ltd. VF2F2. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit.

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

Application Note AN_101. Submitting Modified FTDI Drivers for Windows Hardware Certification

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

Future Technology Devices International Ltd. Application Note AN_234. FTDI Drivers Installation guide for. Windows 8

TTL-232R-3V3 USB to TTL Serial Converter Cable

Future Technology Devices International Ltd

VDIP1. Vinculum VNC1L Module. Datasheet

Technical Note TN_146. Creating Android Images for Application Development

Future Technology Devices International Ltd. USB to RS232 Serial Converter Range of Cables. Datasheet

Technical Note. TN_132 Adding FTDI Devices VCP Driver Support to Android

Future Technology Devices International Ltd USB TO RS422 UART SERIAL CONVERTER PCB. Datasheet. Document Reference No.: FT_000119

Future Technology Devices International Ltd. USB to RS232 UART Serial Converter PCB. Datasheet

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

Application Note AN_185. Vinculum-II UART to USB HID Class Host Bridge

Technical Note TN_158. What is the Camera Parallel Interface?

USB-COM422-PLUS1. Datasheet

UMFT4222PROG FT4222 Programmer Module

DB9-USB-RS232 Module. Male & Female. Datasheet

USB Hi-Speed Serial/Hub Module. Datasheet

C232HD. USB 2.0 Hi-Speed to UART Cable. Datasheet

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

Technical Note TN_105

Application Note AN_276. FT800 Audio File Conversion

Technical Note. TN_147 Java D2xx for Android

USB-COM422-PLUS2. Datasheet

USB-COM232-PLUS4. Datasheet

White Paper WP_003. Android Peripheral Options

The DB9-USB Family of. UART Converter Modules. Datasheet

FTDI Ltd DS_US232R-10(R-100/500) USB to RS232 Adapter cable. Data Sheet

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

C232HM. USB 2.0 Hi-Speed to MPSSE Cable. Datasheet

Vinco Development Module. Datasheet

Future Technology Devices International Ltd

Application Note AN_146. USB Hardware Design Guidelines for FTDI ICs

UC232R ChiPi Minimum Component FT232RL USB to RS232 Converter Cable

Application Note AN_208. FT311D and FT312D Demo_APK_User_GuideFT311D and FT312D Demo_APK_User_Guide

Application Note AN_254. FT800 Designs With Visual TFT

Application Note AN_250. Configuring FT313H Driver for Embedded Linux

Application Note AN_100. Using the FT232R/FT245R with an External Crystal or Oscillator

USB / Data-Acquisition Module NOW LEAD-FREE

NOW LEAD-FREE! VCCIO VCCIO RXLED TXLED DTR# 10K FTDI FT232R

Future Technology Devices International Ltd. MM232R USB - Serial UART Development Module. Datasheet

Application Note AN_113. Interfacing FT2232H Hi-Speed Devices To I2C Bus

Future Technology Devices International Ltd. UM245R USB - Parallel FIFO. Development Module. Datasheet

Using the RS232 serial evaluation boards on a USB port

Application Note AN_252. FT800 Audio Primer

Software Application Development. D2XX Programmer's Guide

Application Note AN_180. FT232H MPSSE Example - USB Current Meter using the SPI Interface

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

ELAN DIGITAL SYSTEMS LTD. SL232 PC- CARD USER S GUIDE

Future Technology Devices International Ltd. UM232R USB - Serial UART Development Module. Datasheet

* Lead Free * DLP-2232ML-G LOW-PROFILE USB MODULE. 1.0 Introduction

USB - FPGA MODULE (PRELIMINARY)

The Secrets of RS-485 Half-duplex Communication

Future Technology Devices International Ltd. FT311D

Prolific USB to SATA Bridge Controller Backup Software User s Manual

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Application Note AN0008. Data Logging Extension. For. Venus 6 GPS Receiver

Wireless Temperature

GSM. Quectel Cellular Engine. HTTP Service AT Commands GSM_HTTP_ATC_V1.2

DK40 Datasheet & Hardware manual Version 2

UM245R USB-Parallel FIFO Development Module

ICs. Modules. Cables. FTDI Chip USB Solutions BRIDGING TECHNOLOGIES.

Quectel Cellular Engine

Future Technology Devices International Ltd. Windows CE Installation Guide

FTDI CDM Drivers Revision Comments

AN_2901CE_001 JULY 2005

PL2303 USB-to-Serial Controller Android USB Host Solution (How to Connect PL2303 Device to Android Tablets & Phones)

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

Keep it Simple Timing

DLP-USB232M USB SERIAL UART Interface Module

Transcription:

Future Technology Devices International Ltd. Technical Note TN_103 FTDI USB Data Transfer Efficiency Document Reference No.: FT_000097 Version 1.0 Issue Date: 2008-10-27 This document examines some factors influencing the efficiency of data transfer for FTDI devices, in particular the FT232 series of USB-UART devices. Future Technology Devices International Limited (FTDI) 373 Scotland Street, Glasgow G5 8QB United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 E-Mail (Support): support1@ftdichip.com Web: http://www.ftdichip.com

Table of Contents Document Reference No.: FT_000097 1 Introduction... 2 2 Bulk Data Transfers... 3 2.1 Sending Data... 3 2.2 Receiving Data... 3 3 Conclusion... 4 4 Contact Information... 5 Appendix A - References... 6 Appendix B - Revision History... 7 Revision Record Sheet... 8

1 Introduction FTDI devices use USB bulk transfers to transport data. The efficiency of bulk data transfers relies on sending and receiving data in large chunks. This document outlines some factors contributing to data transfer efficiency for both sending data to FTDI devices and reading data back.

2 Bulk Data Transfers FTDI devices transfer data using USB Bulk transfers. The most efficient way to conduct USB bulk transfers is in large chunks. FTDI devices are bi-directional and can therefore both send and receive data across a USB connection. Sending data and receiving data will be considered as separate cases. 2.1 Sending Data When writing data to an FTDI device, as much data as possible should be buffered in the application and written to the device in a single write function call (either WriteFile for a VCP application using the Win32 API, FT_Write if using the D2XX classic interface or FT_WriteFile if using the D2XX FT_W32 interface). The result of this is that the data will be written to the device with 64 bytes per USB packet. If data were to be written in small amounts or even individual bytes as many applications written for legacy serial ports do, the USB bulk transfer protocol would only be able to transfer 1 byte per USB packet. This method is not efficient when employing USB bulk transfers and performance will be greatly diminished. 2.2 Receiving Data FTDI devices will return data to the host in 2 cases: The IC has a full buffer of data to send back to the host. The latency timer has expired. If the IC receive buffer is full, data will be returned to the USB host in full USB packets of 64 bytes which contain 2 status bytes and 62 data bytes. The latency timer acts as a timeout on the receive buffer which will trigger the transmission of any data in the chip s receive buffer back to the host. In cases when the amount of data being received is minimal, this prevents applications from having to wait a long time for a full packet. If the receive buffer of the chip is empty when the latency timer expires, 2 status bytes are returned which contain the modem status and line status of the UART. For FT245 devices, these bytes are still returned but have no meaning. If the latency timer is expiring before the receive buffer is full, short USB packets will be returned to the host. As this is not the most efficient packet size, this may be unsuitable for some applications. For example, a UART receiving data at 9600 baud with a default latency timer value (16ms) will generate USB packets of around 16 bytes before the latency timer expires and transmits the data available back to the PC. If 64 byte IN packets were desired to minimise the number of INs required to complete a read, the packet size could be increased by increasing the value of the latency timer. In this case, a value greater than 64ms would be sufficient for the chip to transmit full USB packets back to the host assuming data was constantly being received by the UART. In the case of FTDI s USB-UART devices, the IN packet size may appear to be dependent on baud rate. This is not the case: it is simply that the UART may receive data faster at a higher baud rate and thus has a better chance of filling the buffer before the latency timer expires.

3 Conclusion When optimising data throughput for FTDI devices, the following factors should be considered: Send as much data to the IC from the host application as possible in a single write. This will maximise the size of the data packets being sent to the device and hence minimise the number of packets required and time to transfer an amount of data. Set the latency timer to a value appropriate for the application. Note that a low latency timer value may result in many short incoming USB packets rather than a single large packet, thus diminishing performance.

4 Contact Information Head Office Glasgow, UK Future Technology Devices International Limited 373 Scotland Street Glasgow G5 8QB United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 E-mail (Sales) sales@ftdichip.com E-mail (Support) support@ftdichip.com E-mail (General Enquiries) admin1@ftdichip.com Web Site URL http://www.ftdichip.com Web Shop URL http://www.ftdichip.com Branch Office Taipei, Taiwan Future Technology Devices International Limited (Taiwan) 2F, No. 516, Sec. 1, NeiHu Road Taipei 114 Taiwan, R.O.C. Tel: +886 (0) 2 8797 1330 Fax: +886 (0) 2 8751 9737 E-mail (Sales) tw.sales1@ftdichip.com E-mail (Support) tw.support1@ftdichip.com E-mail (General Enquiries) tw.admin1@ftdichip.com Web Site URL http://www.ftdichip.com Branch Office Hillsboro, Oregon, USA Future Technology Devices International Limited (USA) 7235 NW Evergreen Parkway, Suite 600 Hillsboro, OR 97123-5803 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-Mail (Sales) us.sales@ftdichip.com E-Mail (Support) us.admin@ftdichip.com Web Site URL http://www.ftdichip.com Distributor and Sales Representatives Please visit the Sales Network page of the FTDI Web site for the contact details of our distributor(s) and sales representative(s) in your country. Vinculum is part of Future Technology Devices International Ltd. Neither the whole nor any part of the information contained in, or the product described in this manual, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. Future Technology Devices International Ltd will not accept any claim for damages howsoever arising as a result of use or failure of this product. Your statutory rights are not affected. This product or any variant of it is not intended for use in any medical appliance, device or system in which the failure of the product might reasonably be expected to result in personal injury. This document provides preliminary information that may be subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Future Technology Devices International Ltd, 373 Scotland Street, Glasgow G5 8QB United Kingdom. Scotland Registered Number: SC136640

Appendix A - References D2XX Programmer s Guide AN232B-04 Data Throughput, Latency and Handshaking

Appendix B - Revision History Revision History Document Reference No.: FT_000097 Version 1.00 Initial Release of draft for comment October, 2008 Version 1.00 Initial Release of V1.0 27 th October, 2008