Advanced Driver Options



Yüklə 338,83 Kb.
Pdf görüntüsü
səhifə7/13
tarix08.10.2017
ölçüsü338,83 Kb.
#3923
1   2   3   4   5   6   7   8   9   10   ...   13

 

 

 



Copyright © 2008-2014 Future Technology Devices International Limited 

18 


 

Document Reference No.: FT_000073 

Advanced Driver Options AN_107 Application Note

 

AN_107 Version 2.53 



Clearance No.: FTDI# 63 

HKR,,"ConfigData",1,01,00,3F,3F,10,27,88,13,C4,09,E2,04,71,02,38,41,9C,80,4E,C0,34,00,

1A,00, 0D,00,06,40,03,80,00,00,D0,80 

This entry is byte-reversed, so MSB the DWORD reads 3F 3F 00 01 and the least significant bit is 

Bit 0. The values are given as follows: 

Bits 16 - 23: Receive transfer size 

Bits 24 - 31: Transmit transfer size 

The maximum value permitted in each case is 3F this is the standard default value. 

The transfer size in bytes may be calculated as 

Transfer size in bytes = (Transfer size entry + 1) * 0x40 

The USB transfer sizes used by a device are located in the registry under 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial 

number}\0000\Device Parameters\ConfigData 

 

6.3

 

Setting a Custom Default Latency Timer Value 

The latency timer is a form of time-out mechanism for the read buffer of FTDI devices. When a 

FT_Read instruction is sent to the device, data will not be sent back to the host PC until the 

requested number of bytes has been read. If the requested number of bytes never comes, the 

device would not send data back. 

The latency timer counts from the last time data was sent back to the PC. If the latency timer 

expires, the device will send what data it has available to the PC regardless of how many bytes it 

is waiting on. The latency timer will then reset and begin counting again.  

The default value for the latency timer is 16ms. This value may be customised by adding or 

changing the following entries in the FTDIPORT.INF file of the driver before installation. 

[FtdiPort.NT.HW.AddReg] 

HKR,,"LatencyTimer",0x00010001,50 

This example will set the default latency timer value to 50ms. The valid range for the latency timer 

is 1ms - 255ms, although 1ms is not recommended as this is the same as the USB frame length. 

The latency timer value is held in the registry under 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial 

number}\0000\Device Parameters\LatencyTimer 

Please see 

AN232B-04 Data Throughput, Latency and Handshaking 

for additional information on 

the latency timer. 

 

6.4



 

Enabling Modem Emulation Mode 

Modem emulation mode allows binary data to be transmitted over a two (or more) wire interface 

with full handshaking and modem control signalling, thus allowing PPP connections to be made. 

Possible applications include mobile phone data cables, and radio links. 

Including the following entries in the FTDIPORT.INF file for the VCP driver before installation 

enables modem emulation mode: 

[FtdiPort.NT.HW.AddReg] 

HKR,,"EmulationMode",0x00010001,0x0000nnnn 

This creates a registry entry under 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial 

number}\0000\Device Parameters\EmulationMode 



 

 

 



Copyright © 2008-2014 Future Technology Devices International Limited 

19 


 

Document Reference No.: FT_000073 

Advanced Driver Options AN_107 Application Note

 

AN_107 Version 2.53 



Clearance No.: FTDI# 63 

Please see 

AN232B-09 Using the Modem Emulation Mode in FTDI's VCP Driver 

for additional 

information on modem emulation mode. 

 

6.5



 

Buffered Writes 

In some cases, it is possible that the hardware developer does not have control over the 

application software. This can cause problems when migrating from RS232 to USB, as applications 

written for RS232 typically write bytes to the port one at a time and this will have a detremental 

effect on the USB performance. Due to the packetised nature of USB, it is far more efficient to 

transfer data in large chunks. This can be achieved by bufferring the data within the application. 

If the developer does not have control over the application software to allow for buffering the data 

there, the FTDI driver provides an option to buffer the data from the application in the driver 

before sending the data out over USB to the device. 

The Buffered Writes option is enabled through bit 10 of the first DWORD of the ConfigData entry in 

the FTDIPORT.INF file. This is the same entry that contains the Baud rate table. 

The first DWORD is shown in bold in the INF fragment below. 

[FtdiPort.NT.HW.AddReg] 

HKR,,"ConfigData",1,01,00,3F,3F,10,27,88,13,C4,09,E2,04,71,02,38,41,9C,80,4E,C0,34,00,

1A,00, 0D,00,06,40,03,80,00,00,D0,80 

Please note that the ConfigData entry is byte-reversed, so MSB the DWORD reads 3F 3F 00 01 

and the least significant bit is Bit 0. With Buffered Writes disabled, the DWORD would read 3F 3F 

00 01. With Buffered Writes enabled, the DWORD would read 3F 3F 04 01

In addition to enabling buffered writes in the Config Data entry, some parameters must be set up 

to control the behaviour. These parameters can also be set up in FTDIPORT.INF as follows: 

[FtdiPort.NT.HW.AddReg] 

HKR,,"WriteBufferSize",0x00010001,4096 

HKR,,"WriteBufferThreshold",0x00010001,20 

HKR,,"WriteLatency",0x00010001,6 

These values are held in the registry under this key: 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial 

number}\0000\Device Parameters 

These parameters are specific to the application. As such, they will require to be "tuned" to provide 

best performance. 

 

6.6

 

Miscellaneous Options 

Miscellaneous options available on the 

COM port advanced properties page

 

may be set up at 



installation through the INF sections covered in this section. 

 



Timeouts

 



 

Serial Enumerator

 



 



Serial Printer

 



 

Cancel If Power Off

 



 



Event On Surprise Removal

 



 

Set RTS On Close

 



 



Disable Modem Ctrl At Startup

 

 




Yüklə 338,83 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   10   ...   13




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə