PB_PARPORT-OUTPUT
Section: User Commands (1)
Updated: July 2012
Index
Return to Main Contents
NAME
pb_parport-output - copy data from fifo to parallel port
SYNOPSIS
This copies data from a FIFO (named pipe) to one or more physical (legacy) parallel ports.
Useful to make a slow pulseblaster-equivalent or 'poor man's pulseblaster' from "pb_parse -j"
DESCRIPTION
Usage: pb_parport-output input_fifo
Example: mkfifo myfifo; echo 0x123456 > myfifo & pb_parport-output myfifo
This reads data from a named pipe (or file), and immediately writes the bytes directly to the parallel port(s).
Input data should be in ascii-hex format (eg "0xfe12d3\n"), containing 1-3 bytes of data.
The parallel ports are autodetected: (MSB) /dev/parport2:/dev/parport1:/dev/parport0 (LSB); at least one must be present.
There is no handshaking at the parallel port: the output registers are set directly using ioctl(), and the timing is
is controlled by the input fifo (reads are blocking). When the fifo reaches EOF, this process will exit.
[The other-end of the fifo (the writer) will block on fopen(); also on fwrite() after 64kB buffered, see man (7) pipe.]
Performance is ~ 400k writes/second (measured); this will be shared across all ports used.
WARNING: if multiple parports are used, they will not be perfectly synchronised: watch out for glitches!
The parport device must be available (for PPCLAIM ioctl), but this program need not run as root.
The port must exist as a low-level device (/dev/parportX), not a buffered device (/dev/lpX); only physical ("legacy")
parallel ports can work this way; USB printer adapters won't work.
Copyright Richard Neill, 2011. This is Free Software, licensed under the GNU GPL version 3+.
SEE ALSO
pulseblaster(1),
pb_utils(1),
pb_test-parport(1),
hawaiisim(1),
gtkwave(1),
pbsrc(5),
vliw(5),
pbsim(5),
/usr/local/share/doc/pb_parse/simulation.txt
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 15:45:34 GMT, November 19, 2013