FTDI245IO
Section: User Commands (1)
Updated: July 2012
Index
Return to Main Contents
NAME
ftdi245io - Control an FTDI245 module over USB
SYNOPSIS
ftdi245io connects to a DLP-FTD245M module over a USB 1 (full-speed) bus. This provides an 8-bit parallel port, some of whose lines are
outputs, and some of which are inputs. When writing to Port A, this writes a single byte, and then exits. That byte will persist at the outputs
until over-written by a different one. When reading from Port A, the status of the pins are read at that instant, and then printed to stdout.
DESCRIPTION
DESCRIPTION:
ftdi245io reads and writes to the FTDI245 Module, named Port A.
* PortA is an 8-bit input/output port. (Bitbang mode, output bitmask is 0xF8)
USAGE: Any ONE of these options may be used:
-h --help Print this usage.
--info Print info about the version and configuration settings used.
--check Check for FTDI245s, and check that the expected module is connected.
--check_reset Do --check; also reset the FTDI device and purge the internal buffers.
(This exits as soon as it encounters any device which it can't reset/purge.)
--porta_setpins 0xXX Write (masked) byte 0xXX to port A. Returns immediately, then exits.
Specify the byte as Hex (e.g. 0xFF), Decimal (e.g. 255), or Octal (e.g. 0377)
The Output Mask is 0xF8; input-pins will not be changed.
--porta_readpins Read (masked) byte from the input pins of port A. This is written to stdout as
a single byte in the form 0xXX\n. The program then exits. The Input Mask is 0x07.
--porta_readback Read back the currently buffered byte from port A. We can read back the byte to
get the current state of the outputs. This is written to stdout as a single byte
in the form 0xXX\n. The program then exits.
--porta_test Write a test pattern to port A. This pattern consists of 12 seconds
(128 cycles) of 10Hz "Running LEDs". The LEDs move from LSB -> MSB.
Port A's "carriers" are "electrons", rather than holes.
At the end of the test, 0x0A remains on (to identify it).
NOTE: the output mask for PortA is *ignored* here.
--porta_identify_bit N Flash bit N, (where N is 0..7) at 2Hz, for identification purposes
To check phase, it spends 0.125s high, 0.375s low
This never exits: use Ctrl-C to stop it.
NOTE: the output mask for PortA is *ignored* here.
--porta_zero Set outputs on port A to zero. Useful to prevent parasitically powering
the rest of the circuit during a power-on reset. Equivalent to --porta_setpins 0x00.
REQUIREMENTS:
You may need to be root, to access the FTDI devices. (Sometimes 'pam_console_apply' helps)
This uses (userspace) libusb, which can automatically dissociate the device from the module without blacklisting.
Allow the bus/kernel up to 5 seconds to settle after plugging in a new device.
If this is slow, and using a USB2 Hub, ensure it has one transaction-translator for each ftdi device, and not just one.
[As of 2007, most generic USB2 hubs do not meet this requirement, but share a single T.T. between all ports.]
If weird things happen, it is often a symptom of insufficient power/excess current-draw.
OUTPUTS:
This program always separates stdout from stderr.
The only thing that is written to stdout is the data from --porta_readpins.
stderr receives a confirmation message of what has been done; error messages if failure; and
lots of debugging info if compiled with #define DEBUG 1.
EXIT STATUS:
Exit values are defined in ftdi245io.h. 0 always means success; nonzero means failure.
MORE INFO:
Invoke with --info, or read the source (ftdi245io.c) and header file (ftdi245io.h). Or see man ftdi245io.
[Note that the serial number of the DLP-module is hardcoded in ftdi245io.h; change it there if needed.]
AUTHOR
The author of ftdi245io and this manual page is Richard Neill, <fdti245io#AT(spamblock)#richardneill.org>
Copyright July 2012; this is Free Software (GPL v2+), see the source for copying conditions.
SEE ALSO
cam2tiff(1),
xxd(1),
hexdump(1),
dd(1),
ircam(1),
ircam_hw_check(1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 21:02:31 GMT, November 21, 2013