PERL 5.0 Programmers Guide - FTDI

1y ago
3 Views
1 Downloads
500.76 KB
29 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Grant Gall
Transcription

Future Technology Devices International Ltd.Application Note AN 133D2XX Access Using PERL InterfacePERL 5.0 Programmers GuideDocument Reference No.: FT 0000199Version 1.0Issue Date: 2009-11-10This document provides the application programming interface (API) for the FTD2XX DLLusing the Perl programming language.Future Technology Devices International Limited (FTDI)Unit 1,2 Seaward Place, Glasgow G41 1HH, United KingdomTel.: 44 (0) 141 429 2777 Fax: 44 (0) 141 429 2758E-Mail (Support): support1@ftdichip.com Web: http://www.ftdichip.comCopyright 2009 Future Technology Devices International Limited

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126Table of Contents1Preface . 32Overview . 432.1Prerequisites . 42.2Installing Win32::FTDI::FTD2XX . 4Perl D2XX Functions . 63.1New . 63.2GetNumDevices . 63.3OpenByIndex . 63.4OpenBySerial . 73.5GetDeviceInfo . 73.6Close . 83.7CyclePort . 83.8SetBaudRate . 83.9SetDataCharacteristics . 93.10 SetFlowControl . 93.11 SetDtr . 103.12 ClrDtr . 103.13 SetRts . 113.14 ClrRts . 113.15 SetTimeouts . 113.16 GetTimeouts. 123.17 SetReadTimeout . 123.18 SetWriteTimeout . 133.19 GetReadTimeout . 133.20 GetWriteTimeout. 133.21 GetModemStatus . 143.22 WaitForModem . 143.23 GetQueueStatus . 153.24 Read . 153.25 Write . 153.26 ResetDevice . 163.27 ResetPort . 163.28 SetBreakOn . 17Copyright 2009 Future Technology Devices International Limited1

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1263.29 SetBreakOff . 173.30 GetStatus . 173.31 Purge . 183.32 SetChars . 183.33 Rescan . 193.34 Reload . 193.35 StopInTask . 203.36 RestartInTask . 203.37 SetLatencyTimer . 203.38 GetLatencyTimer . 213.39 GetBitMode . 213.40 SetBitMode. 223.41 SetUSBParameters . 224Code Example. 235Contact Information . 25Appendix A - References . 27Appendix B - Revision History . 28Revision Record Sheet . 29Copyright 2009 Future Technology Devices International Limited2

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1261PrefaceThe D2XX interface is a proprietary interface specifically for FTDI devices. This document will provide anexplanation of how this interface can be accessed using the Perl5 programming language via theWin32::FTDI::FTD2XX wrapper.The Perl D2XX wrapper was kindly provided by Scott K. MacPherson and is free software licensed underthe terms of Perl itself allowing for redistribution and/or modification.The code examples contained within this document are for demonstration purposes only and FTDI extendno responsibility or guarantees regarding the correctness of this code.Copyright 2009 Future Technology Devices International Limited3

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1262OverviewFTDI‟s D2XX library provides an interface to FTDI‟s USB-UART and USB-FIFO ICs, this library providesadditional functions that are not available with standard Windows COM port APIs. Due to the nature ofthe Perl programming language it is not possible to directly communicate using the D2XX library. TheWin32::FTDI::FTD2XX wrapper provides an abstraction between the FTDI D2XX library and Perl. Thisdocument will provide an overview for installing the Win32::FTDI::FTD2XX wrapper and also act as areference for the available functions for interfacing with an FTDI device via the D2XX library.2.1 PrerequisitesTo use the Perl D2XX wrapper you must first have ActivePerl v5.8 or greater installed on your system.The latest version (v5.10 at time of writing) of this can be found on the ActiveState website. The FTDIFTD2XX driver must also be installed, the latest version of the D2XX Driver is available from the FTDIwebsite currently at version 2.04.16. Finally, an FTDI device to communicate with is required.2.2 Installing Win32::FTDI::FTD2XXPerl provides extensions of the language by allowing users to install Perl modules. TheWin32::FTDI::FTD2XX is provided to the user as an additional module that must be installed on thesystem prior to calling any of the functions contained within it.Installing Perl modules can be a difficult and time consuming process; below is one option that mayadopted to install the module but there are possibly other avenues to explore not outlined within. Thereare plenty of websites available on the internet that give detailed descriptions of installing Perl modules.The Win32::FTDI::FTD2XX package is available as a free download from the CPAN website. Downloadthe latest version, 1.04, and save the file within the Perl directory of your machine. The subsequent fileshould have the extension tar.gz, this is a compression format that can be unzipped using third partyextraction tools, e.g. WinZip but there are other alternatives available free from the internet. Extract thefiles into the Perl directory on your machine, in our case it was „C:\Perl’.The next step is to install nmake on the system; this is available as a free download from the MicrosoftWebsite. Save the file when prompted and run the executable Nmake15.exe. This will extract 3 files intothe current directory: NMAKE.ERR; NMAKE.EXE and README.TXT. Paste the files NMAKE.ERR andNMAKE.EXE into the bin folder within your Perl directory „C:\Perl\Bin’.Back in the Perl directory containing the unzipped Perl FTD2XX package, open the file MAINFEST withnotepad to view its contents. This manifest gives a list of the all the files that should have been includedwith the tar.gz download.Move the files that were downloaded so that the paths of these files match those within the manifest file.For example, cut the file Win32-FTDI-FTD2XX.t and paste it into the folder „C:\Perl\t’, cut instp5.dlland paste in the directory „C:\Perl\bin‟. Complete this for the remaining 2 files bearing in mind thatthere needs to be a new folder called „FTDI‟ created within the Win32 e module may now be installed; click start- run, type „cmd’ and press OK. This will launch thecommand prompt window.Browse to the Perl folder within the windows directory using the command prompt window, in this case:CD C:\PerlNow type „perl Makefile.pl’, this command will check to make sure that all the module files are presentwithin their correct respective directories. If an error is encountered stating that some or all of the filesare missing then make sure that the module files have been copied into the correct directories as statedin the MANIFEST file above.Still within the command window type the following commands to install the module:nmakenmake testnmake installCopyright 2009 Future Technology Devices International Limited4

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126The Perl module should now be installed, to test that the module is available and working, create a newtext file called ftd2xx.pl and paste the following code into it.#!/usr/bin/perluse Win32::FTDI::FTD2XXBrowse to the file, again with the command prompt window, and run the application by typingftd2xx.pl. The code should run with no compilation errors indicating that the module has been installedcorrectly and is now available for use.Copyright 2009 Future Technology Devices International Limited5

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1263Perl D2XX Functions3.1 NewSummaryThis command creates a new instance of the WIN32::FTDI class; this class instance is then usedthroughout the program to reference the device. This function must be called at the start of theapplication to allow communication to a device. The new function has a built in auto-destroy feature thatwill close a handle to any device as part of Perl‟s garbage collection when the program ends.DefinitionWin32::API::FTD2XX- new()ParametersNoneReturn ValueReturns an object instance that is used throughout the program to reference to an FTDI devices.Examplemy FTDIdevice Win32::API::FTD2XX- new();.my numDevices FTDIdevice- GetNumDevices();.3.2 GetNumDevicesSummaryReturns the number of FTDI devices that are currently connected to the host urn ValueUpon successful completion of the function it will return the number of devices connected to the host,otherwise NULL.Examplemy FTDIdevice Win32::API::FTD2XX- new();my numDevices FTDIdevice- GetNumDevices();# Get the number of connected devices.3.3 OpenByIndexSummaryOpen an FTDI device based on the index ID with which it has been enumerated on the host machine.DefinitionOpenByIndex( devIndex)Parameters devIndex – an integer indicating the index of the device.Return ValueReturns true if a handle to the specified device has been obtained, false otherwise.ExampleCopyright 2009 Future Technology Devices International Limited6

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126my FTDIdevice Win32::API::FTD2XX- new();my devToOpen 0;my devOpen FTDIdevice- OpenByIndex( devToOpen);if( devOpen){print “Device devToOpen is open!“;}3.4 OpenBySerialSummaryOpen an FTDI device based on the serial ID of the chip.DefinitionOpenBySerial( devSerial)Parameters devSerial – Device serial number.Return ValueReturns true if a handle to the specified device has been obtained, false otherwise.Examplemy FTDIdevice Win32::API::FTD2XX- new();my devToOpen “FT12345”;my devOpen FTDIdevice- OpenBySerial( devToOpen);if( devOpen){print “Device devToOpen is open!“;}3.5 GetDeviceInfoSummaryUsed to obtain string descriptors for an open rn ValueString descriptors for the device are returned in the form of a hash, if the function fails to complete it willreturn NULL. Please refer to the example below for further details of the hash.Examplemy FTDIdevice Win32::API::FTD2XX- new();my devInfo FTDIdevice - GetDeviceInfo();if( devInfo ){my out sprintf( " Type:\t\t%d (%s)\n ID:\t\tVID(%04X) PID(%04X)\nSerial:\t%s\n Descr:\t%s\n", devInfo- {TypeID}, devInfo- {TypeNm}, devInfo {VID}, devInfo- {PID}, devInfo- {Serial}, devInfo- {Descr} );print " out";Copyright 2009 Future Technology Devices International Limited7

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126}3.6 CloseSummaryCloses the handle to any open FTDI device. Please note that there is an auto-destory feature that willclose the handle to an open FTDI device as part of the Perl garbage collection.DefinitionClose()ParametersNoneReturn ValueThis function will return true if a device has been closed successfully, false otherwise.Examplemy devClosed FTDIdevice- Close();if( devCLosed){# Operation successful}3.7 CyclePortSummarySend a cycle command to the USB port, the effect of this function is the same as disconnecting andreconnecting the device. This can be useful when recovering from fatal errors or forcing the FTDI to readthe contents of the EEPROM again. Please note that there is an unspecified wait time for performing thisfunction until the FTDI is stable again. Attempting to communicate during this time may result in aninvalid handle from the device.DefinitionCyclePort()ParametersNoneReturn ValueThis function will return true on successful completion of the operation, false otherwise.Examplemy result FTDIdevice- CyclePort();if( result){# Operation Successful}3.8 SetBaudRateSummarySets the baud rate of the currently open device.DefinitionSetBaudRate( baudRate)ParametersCopyright 2009 Future Technology Devices International Limited8

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126 baudRateReturn ValueReturns true on successful completion, false otherwise.Examplemy baudRate 115200;my status FTDIdevice- SetBaudRate( baudRate);if( status){# Operation Successful}3.9 SetDataCharacteristicsSummarySets the data characteristics of the currently open device. Please refer to the D2XX Programmer‟s Guidefor a more detailed description of the parameters.DefinitionSetDataCharacteristics( dataBits, stopBits, parityBits)Parameters dataBits – the number of bits per word, must be 8 or 7 stopBits – the number of stop bits, must be 1 or 2 parityBits - parityReturn ValueReturns true on successful completion, false otherwise.Exampleuse constant {DATABITS 8,STOPBITS 1,PARITYBITS 0};.my status FTDIdevice- SetDataCharacteristics(DATABITS, STOPBITS, PARITYBITS);if( status){# Operation Successful}3.10 SetFlowControlSummarySets the flow control for the currently open device. Please refer to the D2XX Programmer‟s Guide for amore detailed description of the parameters.DefinitionSetFlowControl( flowControl, Xon, Xoff)Parameters flowControlCopyright 2009 Future Technology Devices International Limited9

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126 Xon XoffReturn ValueReturns true on successful completion, false otherwise.Exampleuse constant {FLOWCTRL 256,XON 0,XOFF 0};.my status FTDIdevice- SetFlowControl(FLOWCTRL, XON, XOFF);if( status){# Operation Successful}3.11 SetDtrSummaryThis function asserts the Data Terminal Ready (DTR) control signal.DefinitionSetDtr()ParametersNoneReturn ValueReturns true on successful completion, false otherwise.Examplemy status FTDIdevice- SetDtr();if( status){# Operation Successful}3.12 ClrDtrSummaryThis function clears the Data Terminal Ready (DTR) control signal.DefinitionClrDtr()ParametersNoneReturn ValueReturns true on successful completion, false otherwise.ExampleCopyright 2009 Future Technology Devices International Limited10

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126my status FTDIdevice- ClrDtr();if( status){# Operation Successful}3.13 SetRtsSummaryThis function asserts the Request To Send (RTS) control signal.DefinitionSetRts()ParametersNoneReturn ValueReturns true on successful completion, false otherwise.Examplemy status FTDIdevice- SetRts();if( status){# Operation Successful}3.14 ClrRtsSummaryThis function clears the Request To Send (RTS) control signal.DefinitionClrRts()ParametersNoneReturn ValueReturns true on successful completion, false otherwise.Examplemy status FTDIdevice- ClrRts();if( status){# Operation Successful}3.15 SetTimeoutsSummaryThis function sets the read and write timeouts for the device.DefinitionSetTimouts( readTimeout, writeTimeout)Copyright 2009 Future Technology Devices International Limited11

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126Parameters readTimeout writeTimeoutReturn ValueReturns true on successful completion, false otherwise.Examplemy status FTDIdevice- SetTimeouts(5000, 1000);# Read 5 secs, write 1 secif( status){# Operation Successful}3.16 GetTimeoutsSummaryThis function gets the read and write timeouts for the device.DefinitionGetTimeouts()ParametersNoneReturn ValueReturns the previously set read and write timeouts for the device, will return null if the operation hasbeen unsuccessful.Example(my readTimeout, my writeTimeout) FTDIdevice- GetTimeouts();print(“Read Timeout: readTimeout\n”);print(“Write Timeout: writeTimeout\n”);3.17 SetReadTimeoutSummaryThis function sets the read timeout for the device.DefinitionSetReadTimeout( readTimeout)Parameters readTimeoutReturn ValueReturns true on successful completion, false otherwise.Examplemy readTimeout 1000;my success FTDIdevice- SetReadTimeout( readTimeout);if( success){# Operation Successful}Copyright 2009 Future Technology Devices International Limited12

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1263.18 SetWriteTimeoutSummaryThis function sets the write timeout for the device.DefinitionSetWriteTimeout( writeTimeout)Parameters writeTimeoutReturn ValueReturns true on successful completion, false otherwise.Examplemy writeTimeout 1000;my success FTDIdevice- SetWriteTimeout( writeTimeout);if( success){# Operation Successful}3.19 GetReadTimeoutSummaryThis function gets the read timeout for the urn ValueIf the operation is successful it will return the read timeout for the current device, null otherwise.Examplemy readTimeout FTDIdevice- GetReadTimeout();if( readTimeout){print(“Read timeout: readTimeout”);}3.20 GetWriteTimeoutSummaryThis function gets the write timeout for the turn ValueIf the operation is successful it will return the write timeout for the current device, null otherwise.ExampleCopyright 2009 Future Technology Devices International Limited13

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126my writeTimeout FTDIdevice- GetWriteTimeout();if( writeTimeout){print(“Write timeout: writeTimeout”);3.21 }GetModemStatusSummaryGets the modem status and line status from the device. Please refer to the D2XX Programmer‟s Guidefor a more detailed description of the return rn ValueIf the operation is successful it will return the modem status for the current device, null otherwise.Examplemy modemStatus 0;my lineStatus 0;my status FTDIdevice- GetModemStatus();if( status){ lineStatus (( status 8) & 0x000000FF); modemStatus ( status & 0x000000FF);}3.22 WaitForModemSummaryThis function can be used to suspend program execution until one or more of the modem status bits isset.DefinitionwaitForModem( modemStatusBitmask, timeout, pollTm)Parameters modemStatusBitmask – the modem bit to wait on, defined under Modem Status within the D2XXProgrammer‟s Guide appendix A. timeout – Optional, the wait time in seconds, if blank the device will wait indefinitely. pollTm – Optional, this is the time in seconds between polls of the device, default value is 0.25 secs.Return ValueReturns true on successful completion, false otherwise.Example# Waits 3 seconds for the CTS line to be asserted.my status FTDIdevice- waitForModem(0x10, 3);if( status){# Operation successful}Copyright 2009 Future Technology Devices International Limited14

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 1263.23 GetQueueStatusSummaryGets the number of bytes that are in the receive queue to be read from the urn ValueIf the operation is successful it will return the number of bytes in the read queue for the current device, ifthere are no bytes to read zero will be returned.Examplemy rxBytesAvail FTDIdevice- GetQueueStatus();if( rxBytesAvail){print(“ rxBytesAvail bytes to be read from the device.”);}3.24 ReadSummaryRead any data from the device.DefinitionRead( rxBytesAvail)Parameters rxBytesAvailReturn ValueIf the operation is successful it will return the number of bytes read ( bytesReturned p) and the data( readBuffer p) from the device as scalar values.Examplemy bytesReturned p; # packed version of bytes readmy readBuffer p; # packed version of read buffermy readBuffer; # unpacked version of read buffermy rxBytesAvail FTDIdevice- GetQueueStatus();if( rxBytesAvail){( bytesReturned p, readBuffer p) FTDIdevice- Read( rxBytesAvail); readBuffer unpack(“a*”, readBuffer p);# Unpack the data from the deviceprint(“Read: readBuffer from the device.”);}NoteData returned from the device is in a raw binary format, the unpack function is required to format thedata as an ASCII string.3.25 WriteCopyright 2009 Future Technology Devices International Limited15

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126SummaryWrite data to the device.Definitionwrite( writeBuffer, bytesToWrite)Parameters writeBuffer bytesToWrite – optional parameter, if this is not specified „length( writeBuffer)‟ is used.Return ValueIf the operation is successful it will return the number of bytes that have been written to the device.Examplemy writeBuffer “Hello World!”; # unpacked version of write buffermy bytesToWrite 12; # Size of the write buffer.my writeBuffer p; # packed version of write buffer writeBuffer p pack(“a*”, writeBuffer);# pack the write buffer.my bytesWritten FTDIdevice- Write( writeBuffer p, bytesToWrite);if( bytesWritten bytesToWrite){print(“Data successfully sent to the device.”);}3.26 ResetDeviceSummarySends a reset command to the device.DefinitionResetDevice()ParametersNoneReturn ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- ResetDevice();if( success){# Device Reset}3.27 ResetPortSummarySends a reset command to the port.DefinitionResetPort()ParametersCopyright 2009 Future Technology Devices International Limited16

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126NoneReturn ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- ResetPort();if( success){# Port Reset successful.}3.28 SetBreakOnSummarySets the break condition for the device.DefinitionSetBreakOn()ParametersNoneReturn ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- SetBreakOn();if( success){# Operation successful.}3.29 SetBreakOffSummaryResets the break condition for the device.DefinitionSetBreakOff()ParametersNoneReturn ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- SetBreakOff();if( success){# Operation successful.}3.30 GetStatusSummaryCopyright 2009 Future Technology Devices International Limited17

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126Gets the device status including the number of characters in the receive queue, the number of charactersin the transmit queue and the current event status.DefinitionGetStatus()ParametersNoneReturn ValueReturns amount of data in the Rx queue, the amount of data in the Tx queue and the current eventstatus of the device. Please refer to the D2XX Programmer‟s Guide for a more detailed description of theevent status messages returned from this function.Example(my rxQueue, my txQueue, my eventStatus) FTDIdevice- GetStatus();print(“Size of receive queue: rxQueue”);print(“Size of transmit queue: txQueue”);3.31 PurgeSummaryPurges receive and transmit buffers in the device.DefinitionPurge( mask)Parameters maskReturn ValueReturns true if the operation has been successful, false otherwise.Exampleuse constant{FT PURGE RX 1,FT PURGE TX 2};.# Purge both RX and TX buffers.my success FTDIdevice- Purge(FT PURGE RX FT PURGE TX);if( success){# Operation successful.}3.32 SetCharsSummaryThis function allows for the insertion of specified characters in the data stream to represent events firingor errors occurring.DefinitionSetChars( eventCh, eventChEn, errorCh, errorChEn)Parameters eventCh – the event character.Copyright 2009 Future Technology Devices International Limited18

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126 eventChEn – 0 if event character disabled, non-zero otherwise. errorCh – the error character. errorChEn – 0 if error character disabled, non-zero otherwise.Return ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- SetChars(0x12, 1 , 0x14, 1);if( success){# Operation successful.}3.33 RescanSummaryThis function can be used to try to recover a device programmatically. This is the equivalent to clicking“Scan for hardware changes” within the device manager. All connected USB devices are scanned as wellas FTDI devices.DefinitionRescan()ParametersNoneReturn ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- Rescan();if( success){# Operation successful.}3.34 ReloadSummaryThis function forces a reload of the driver for the devices with a specific Vendor ID and Product ID asspecified. If the VID and PID parameters are null, all USB devices connected will reload their drivers.Please note that this function will not work correctly on 64-bit Windows when called from a 32-bitapplication.DefinitionReload( VID, PID)Parameters VID – vendor ID, the FTDI default is 0x0403. PID – product ID.Return ValueReturns true if the operation has been successful, false otherwise.Examplemy success FTDIdevice- Reload(0x0403, 0x6001); # Standard FT232R device.Copyright 2009 Future Technology Devices International Limited19

Document Reference No.: FT 0000199D2XX Access Using PERL Interface PERL 5.0 Programmers GuideApplication Note AN 133 Version 1.0Clearance No.: FTDI# 126if( success){# Operation successful.}3.35 StopInTaskSummaryThis function is used to put the driver‟s IN task (read) into a wait state. It can be used in situationswhere data is being received co

Perl provides extensions of the language by allowing users to install Perl modules. The Win32::FTDI::FTD2XX is provided to the user as an additional module that must be installed on the system prior to calling any of the functions contained within it. Installing Perl modules can be a difficult and time consuming process; below is one option .

Related Documents:

Why Perl? Perl is built around regular expressions -REs are good for string processing -Therefore Perl is a good scripting language -Perl is especially popular for CGI scripts Perl makes full use of the power of UNIX Short Perl programs can be very short -"Perl is designed to make the easy jobs easy,

Perl can be embedded into web servers to speed up processing by as much as 2000%. Perl's mod_perl allows the Apache web server to embed a Perl interpreter. Perl's DBI package makes web-database integration easy. Perl is Interpreted Perl is an interpreted language, which means that your code can be run as is, without a

Other Perl resources from O’Reilly Related titles Learning Perl Programming Perl Advanced Perl Programming Perl Best Practices Perl Testing: A Developer’s . Intermedi

Run Perl Script Option 3: Create a Perl script my_script.pl: Run my_script.pl by calling perl: 8/31/2017 Introduction to Perl Basics I 10 print Hello World!\n; perl ./my_script.pl Option 4: For a small script with several lines, you can run it directly on the command line: perl -e print Hello World!\n;

Perl's creator, Larry Wall, announced it the next day in his State of the Onion address. Most notably, he said "Perl 6 is going to be designed by the community." Everyone thought that Perl 6 would be the version after the just-released Perl v5.6. That didn't happen, but that's why "Perl" was in the name "Perl 6."

tutorial Sorry about that but I have to keep my tutorial's example scripts short and to the point Finally, this is a tutorial for Perl/Tk only I will not be teaching perl here So if you know perl, continue But if you are a beginner to perl, I would recommend that you read my perl tutorial

Run Perl Script Option 3: Create a Perl script my_script.pl: Run my_script.pl by calling perl: 8/31/2017 Introduction to Perl Basics I 10 print Hello World!\n; perl ./my_script.pl Option 4: For a small script with several lines, you can run it directly on the command line: perl -e print Hello World!\n;

Introduction to Perl Pinkhas Nisanov. Perl culture Perl - Practical Extraction and Report Language Perl 1.0 released December 18, 1987 by Larry Wall. Perl culture Perl Poems BEFOREHAND: close door, each window & exit; wait until time. open spellbook, study, read (scan, select, tell us);