The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Future Technology Devices International Ltd. 2006 AN232B-04 Data


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



AN232B-04 Data Throughput, Latency Handshaking
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Table Contents
Part Data Throughput, Latency Handshaking Part Data Transfer
Background
Need Handshaking Data Transfer Comparison Continuous Data Smoothing Lumps
Part Buffers Latency Timer
Small Amounts Data Buffer Conditions Adjusting Receive Buffer Latency Timer Effect Buffer Size Latency Timer Data Throughput Adjusting Transfer Size
Part Events Flow Control
Event Characters Flushing. Receive Buffer Using Modem Status Lines Flow Control
Part History, Disclaimer, Contact Information
Document Revision History Disclaimer Contact Information
Index
Future Technology Devices International Ltd. 2006
Data Throughput, Latency Handshaking
Data Throughput, Latency Handshaking
Background
Universal Serial some users developers. This application note tries describe major architecture differences that need considered both software hardware designers when changing from traditional RS232 based solution that uses FT232R, FT2232C (UART mode) FT232BM serial interface devices. Much information this application note also applies FT245R, FT2232C (FIFO mode) FT245BM parallel FIFO interface devices.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Data Transfer
Need Handshaking
data transfer prone delays that normally appear systems that have been used transferring data using interrupts. original ports were directly connected motherboard were interrupt driven. When character transmitted received (depending FIFO's used) would interrupted routine handle data. This meant that user could reasonably certain that, given particular baud rate data rate, transfer data could achieved without real need flow control. hardware interrupt ensured that request would serviced. Therefore data could transferred without using handshaking still arrive into without data loss.
Future Technology Devices International Ltd. 2006
Data Transfer
Data Transfer Comparison
does transfer data using interrupts. uses scheduled system result, there periods when request does scheduled and, handshaking used, data loss will occur. example scheduling delays seen open application dragged around using mouse. device, data transfer done packets. data sent from then packet data built device driver sent scheduler. This scheduler puts request onto list tasks host controller perform. This will typically take least millisecond execute because will pick request until next 'USB Frame' (the frame period millisecond). Therefore there sizable overhead (depending your required throughput) associated with moving data from application device. data were sent byte time' application, this would severely limit overall throughput system whole.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Continuous Data Smoothing Lumps
Data received from polling method. driver will request certain amount data from scheduler. This done multiples bytes. 'bulk packet size' maximum bytes. host controller will read data from device until either: packet shorter than bytes received requested data length reached device driver will request packet sizes between Bytes Kbytes. size packet will affect performance dependent data rate. very high speed, largest packet size needed. 'real-time' applications that transferring audio data 115200 Baud example, smallest packet possible desirable, otherwise device will holding data time. This give effect 'jerky' data transfer request size large data rate (relatively).
Future Technology Devices International Ltd. 2006
Buffers Latency Timer
Buffers Latency Timer
Small Amounts Data Buffer Conditions
When transferring data from FTDI USB-Serial USB-FIFO device device will send data given following conditions: buffer full bytes made status bytes user bytes). RS232 status lines changed (USB-Serial chips only). change level (high low) CTS# DSR# DCD# will cause pass back current buffer even though empty have less than bytes event character been enabled detected incoming data stream. timer integral chip timed out. There timer (latency timer) FT232R, FT245R, FT2232C, FT232BM FT245BM chips that measures time since data last sent default value timer milliseconds. Every time data sent back timer reset. times-out then chip will send back status bytes data that held buffer.
From this seen that small amounts data large amounts data), will subject millisecond delay when transferring into This delay should taken along with delays associated with request size mentioned previous section. timer value chosen that could make advantage byte packets fill large buffers when high speed mode, well letting single characters through. Since value chosen latency timer milliseconds, this means that will take milliseconds receive individual character, over above transfer time serial parallel link. large amounts data, high data rates, timer will used. used send last packet block, final packet size works less than bytes. first bytes every packet used status bytes driver. This status sent every milliseconds, even when data present device. worst case condition could occur when bytes data received milliseconds. This would cause timeout, would send bytes status user data bytes) back every milliseconds. When USBD system driver receives bytes would hold them request another 'IN' transaction. This would completed another milliseconds later until USBD gets data required. overall time would (4096 milliseconds 1.024 seconds between data packets being received application. order stop data arriving packets, should requested smaller amounts. short packet bytes) will course cause data pass from USBD back FTDI driver application. application programmers must stressed that data should sent received using buffers individual characters.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Adjusting Receive Buffer Latency Timer
FTDI's series chips allow latency timer changed from milliseconds value from milliseconds, millisecond increments. When using FTDI Virtual Port driver latency timer port properties page. Windows, port properties page accessed Control Panel System Device Manager. Windows 2000 initial value latency timer also pre-configured ftdiport.inf changing value last number following line: [FtdiPort.NT.HW.AddReg] where again, milliseconds default value. When using FTDI's D2XX direct driver function FT_SetLatencyTimer used adjust value latency timer.
Future Technology Devices International Ltd. 2006
Buffers Latency Timer
Effect Buffer Size Latency Timer Data Throughput
effect that immediately obvious size total packet request smoothness data flow. When read request sent USB, host controller will continue read byte packets until following conditions met: read requested size (default Kbytes). received packet shorter than bytes from chip. been cancelled.
While host controller waiting above conditions occur, data received driver hence user's application. data, there any, only finally transferred after above conditions occurred. Normally condition will occur will look cases byte packets continually sent back host, then will continue read data match block size requested before sends block back driver. small amount data sent, data sent slowly, then latency timer will take over send short packet back host which will terminate read request. data that been read then passed users application FTDI driver. This shows relationship between latency timer, data rate when data will become available user. condition occur where data passed into FTDI chip such rate avoid latency timer timing out, take long time between receiving data blocks. This occurs because host controller will byte packets point just before latency period will therefore continue read data until reaches block size before passed back user's application. rate that causes this will Latency Timer bytes/Second
bytes byte packet used status) default values: 0.016 3875 bytes /second 38.75 KBaud Therefore data received rate 3875 bytes second (38.75 KBaud) faster, then data will subject delays based requested block length. data received slower rate, then there will less than bytes including status bytes) available after milliseconds. Therefore short packet will occur, thus terminating request passing data back. limit condition 38.75 KBaud will take approximately 1.06 seconds between data buffers into users application (assuming 4Kbyte block request buffer size). around this either increase latency timer reduce block request. Reducing block request preferred method though balance between sought optimum system response.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Adjusting Transfer Size
Again, when using FTDI Virtual Port drivers Transfer (buffer) size port properties page. initial buffer size calculated from entries ftdiport.inf file with size buffer allocated being equal .inf entry plus multiplied (bytes). bytes, (63+1)*64 4096. There entries file first transmit buffer second receive buffer. [FtdiPort.NT.HW.AddReg] example above 3F's entries question, with this line being byte buffer size operation [FtdiPort.NT.HW.AddReg] being byte buffer size operation. When using FTDI's D2XX direct driver function FT_SetUSBParameters used adjust size block requested, indicated AN232B03 D2XX Optimizing D2XX Data Throughput.
Future Technology Devices International Ltd. 2006
Events Flow Control
Events Flow Control
Event Characters
Event characters used with FT232R, FT245R, FT2232C, FT232BM FT245BM devices. event character enabled detected data stream, then contents devices buffer sent immediately. event character stripped data stream device drivers, application remove Event characters turned depending whether large amounts random data small command sequences sent. event character will work first character buffer. needs second higher. reason this being applications that Internet example, will program event character '$7E'. data then sent received packets that have '$7E' start packet. order maximise throughput avoid packet with only starting '$7E' event character does trigger first position.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Flushing Receive Buffer Using Modem Status Lines
Flow control used FT232R, FT2232C (UART mode) FT232BM devices flush buffer chip. Changing modem status lines will this. modem status lines controlled external device from host itself. unused output line (DTR) connected unused inputs (DSR), then line changed application program from high high low, this will cause change make flush buffer.
Future Technology Devices International Ltd. 2006
Events Flow Control
Flow Control
FT245R, FT2232C FIFO mode) FT245BM chips their handshaking integral part design, proper TXE# line. FT232R, FT2232C UART mode) FT232BM chips RTS/CTS, DTR/DSR hardware XOn/XOff software handshaking. highly recommended that some form handshaking used. There methods flow control that programmed FT232BM device. None this result data loss high speeds RTS/CTS wire handshake. device will transmit active will drop cannot receive more. DTR/DSR wire handshake. device will transmit active will drop cannot receive more. XON/XOFF flow control done sending receiving special characters. (transmit other XOff (transmit off). They individually programmable value.
strongly encouraged that flow control used because impossible ensure that FTDI driver will always scheduled. chip buffer bytes data. Windows 'starve' driver program time doing other things. most obvious example this moving application around screen with mouse grabbing task bar. This will result graphics activity data loss will occur receiving data 115200 baud example) with handshaking. data rate data loss acceptable then flow control omitted.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
History, Disclaimer, Contact Information
Document Revision History
AN232B-04 Version Initial document created March 2004. AN232B-04 Version Format updated, various corrections throughout document.
Future Technology Devices International Ltd. 2006
History, Disclaimer, Contact Information
Disclaimer
Future Technology Devices International Limited 2006 Neither whole part information contained product described this manual, adapted reproduced material electronic form without prior written consent copyright holder. This product documentation supplied as-is basis warranty their suitability particular purpose either made implied. Future Technology Devices International Ltd. will accept claim damages howsoever arising result failure this product. Your statutory rights affected. This product variant intended medical appliance, device system which failure product might reasonably expected result personal injury. This document provides preliminary information that subject change without notice.
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
Contact Information
Head Office Glasgow, Future Technology Devices International Limited Scotland Street Glasgow United Kingdom Tel: 2777 Fax: 2758 E-Mail (Sales): sales1@ftdichip.com E-Mail (Support): support2@ftdichip.com E-Mail (General Enquiries): admin1@ftdichip.com Site URL: http://www.ftdichip.com Shop URL:
Branch Office Taiwan Future Technology Devices International Limited (Taiwan) 16-1, Sec. Mincyuan East Road Neihu District Taipei Taiwan Tel: +886 8791 3570 Fax: +886 8791 3576 E-Mail (Sales): tw.sales@ftdichip.com E-Mail (Support): tw.support@ftdichip.com E-Mail (General Enquiries): tw.admin@ftdichip.com Site URL: http://www.ftdichip.com
Branch Office Hillsboro, Oregon, Future Technology Devices International Limited (USA) 5285 Elam Young Parkway Suite B800 Hillsboro, 97124-6499 Tel: (503) 547-0988 Fax: (503) 547-0987 E-Mail (Sales): us.sales@ftdichip.com E-Mail (Support): us.support@ftdichip.com E-Mail (General Enquiries): us.admin@ftdichip.com Site URL: http://www.ftdichip.com
Agents Sales Representatives Please visit Sales Network page FTDI site contact details distributor(s) your country.
Future Technology Devices International Ltd. 2006
Index
Index
-$$7E
-FFlow Control Frame FT_SetLatencyTimer FT_SetUSBParameters FT2232C FT232BM FT232R FT245BM FT245R ftdiport.inf
-116
-BBaud Rate Block Size Buffer Buffer Size Bulk Packet Size Byte Time
-HHandshaking Host Controller
-IIN Transaction Individual Characters file Interrupts
-CCOM Port Contact CTS#
-DD2XX Data rate Data Stream DCD# Disclaimer Document Revision History DSR#
-JJerky Data
-LLatency Timer
-MModem Status Lines
-PPacket Polling Port Properties Page
-EEmail Event Character Event Characters
Future Technology Devices International Ltd. 2006
AN232B-04 Data Throughput, Latency Handshaking
-RRead Request Real Time Applications Receive Buffer RS232
-SScheduling Status Bytes
-TTrigger TXE#
-UUniversal Seial block request Frame Host Controller Packet Packets Request Scheduler Total Packet Requst Transfer Size USBD
-VVCP Driver Virtual Port Driver
-XXOff XOn/XOff
Future Technology Devices International Ltd. 2006

Other recent searches


VSP7502 - VSP7502   VSP7502 Datasheet
SH7729 - SH7729   SH7729 Datasheet
SH7709A - SH7709A   SH7709A Datasheet
HS7729D8IW1S - HS7729D8IW1S   HS7729D8IW1S Datasheet
HS7729D8IW1SE - HS7729D8IW1SE   HS7729D8IW1SE Datasheet
SDM7128-XC - SDM7128-XC   SDM7128-XC Datasheet
LVY3330 - LVY3330   LVY3330 Datasheet
FT245RL - FT245RL   FT245RL Datasheet
BTS711L1 - BTS711L1   BTS711L1 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive