FTD2XX_NET_Write_Ge​tPinStates

Adds Read pin state funcionality to previously posted Test_FTD2XX_NET_BitBang demo code.
ダウンロード: 541
更新 2011/5/24

ライセンスの表示

File demonstrates calling directly into the FTD2XX_NET.dll library from Matlab code. Code demonstrates how to split the data pins into two groups of four bits. Demo writes to 4 bits, reads the other 4 bits. FTDI makes USB compatible devices which can make the creation of USB-based electronic instruments much easier. The FTD2XX_NET.dll (downloadable ftdichip.com) is a .Net wrapper for the FTDI D2XX USB device driver programming library. This library eliminates the need for device developers to write custom USB drivers when developing custom instrumentation which interfaces to a PC via the USB ports.

Test_FTD2XX_NET_BitBang.m demonstrates opening the dll, opening a FTDI FT245-based USB device, and setting the device up for BitBang mode. In BitBang mode, the FT245 device functions as an 8-bit parallel I/O port. Modern PCs and laptops do not typically contain such parallel interfaces anymore. Hanging a simple module containing the FTDI FT245 chip, such as the DLP-USB245M, on a PC USB bus can add parallel port I/O capability to your PC which can be useful when controlling or communicating with external hardware.

USB245 is set up with 10k pullups on d3-d0 outputs(write pins) and the pins are jumpered to d7-d4 inputs(read pins). Via the FTD2XX_NET.dll, Test_FTD2XX_NET_BitBang_Write_GetPinStates.m 'bangs' four ouput bits of the DLP-USB245M, writing hex values from 0 to 15 interleaved with zero values. After every write, there is a GetPinState "read" which reads back the input pins. Debug statements show read values.

No .mex files, header files, or other fussing around is necessary as (at least the most recent versions) Matlab user code can directly call into .NET assemblies such as the FTD2XX_NET.dll.

引用

Roger M. Ellingson (2024). FTD2XX_NET_Write_GetPinStates (https://www.mathworks.com/matlabcentral/fileexchange/31553-ftd2xx_net_write_getpinstates), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersInstrument Control Toolbox についてさらに検索
謝辞

ヒントを得たファイル: Test_FTD2XX_NET_BitBang

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0