in reply to Re^4: Problem Writing to FTDI COM Port using Win32::FTDI::FTD2XX
in thread Problem Writing to FTDI COM Port using Win32::FTDI::FTD2XX
The mask is telling it which pins are input and which are output. A 0 bit is an input, a 1 is an output. The lowest bit is D0 (TXD), next is D1 (RXD), and so forth. Google "FTDI2XX mask mode bitbang" and you'll find the whole mapping. So, to set all lines/outputs to output in async bitbang:# Get/Set BitMode use constant PFT_BITMODE_RESET => 0x00; use constant PFT_BITMODE_ASYNCBB => 0x01; use constant PFT_BITMODE_MPSSE => 0x02; use constant PFT_BITMODE_SYNCBB => 0x04; use constant PFT_BITMODE_MHBEM => 0x08; use constant PFT_BITMODE_FOISM => 0x10; use constant PFT_BITMODE_CBUSBB => 0x20;
# # assuming you called OpenByIndex on this object already # $mode = $FTDIdev->SetBitMode(0xFF, 0x01);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Problem Writing to FTDI COM Port using Win32::FTDI::FTD2XX
by PrfrrdUsrNm (Initiate) on Jan 17, 2014 at 03:27 UTC | |
by kschwab (Vicar) on Jan 17, 2014 at 11:52 UTC | |
by PrfrrdUsrNm (Initiate) on Jan 20, 2014 at 05:12 UTC |