1
2 Parapin
3 the Parallel Port Pin Programming Library for Linux
4
5 Release 0.96 -- September 10, 2003
6
7 Jeremy Elson
8 jelson@circlemud.org
9
10
11 ----------------------------------------------------------------------
12
13
14 === What is Parapin, and where did it come from?
15
16 parapin makes it easy to write C code under Linux that controls
17 individual pins on a PC parallel port. This kind of control is very
18 useful for electronics projects that use the PC's parallel port as a
19 generic digital I/O interface. Parapin goes to great lengths to
20 insulate the programmer from the somewhat complex parallel port
21 programming interface provided by the PC hardware, making it easy to
22 use the parallel port for digital I/O. By the same token, this
23 abstraction also makes Parapin less useful in applications that need
24 to actually use the parallel port as a parallel port (e.g., for
25 talking to a printer).
26
27 Parapin has two ``personalities'': it can either be used as a
28 user-space C library, or linked as part of a Linux kernel module. The
29 user and kernel personalities were both written with efficiency in
30 mind, so that Parapin can be used in time-sensitive applications.
31 Using Parapin should be very nearly as fast as writing directly to the
32 parallel port registers manually.
33
34 Parapin provides a simple interface that lets programs use pins of the
35 PC parallel port as digital inputs or outputs. Using this interface,
36 it is easy to assert high or low TTL logic values on output pins or
37 poll the state of input pins. Some pins are bidirectional--that is,
38 they can be switched between input and output modes on the fly.
39
40 Parapin was written by Jeremy Elson (jelson@circlemud.org) while at
41 the University of Southern California's Information Sciences
42 Institute. This work was supported by DARPA under grant No.
43 DABT63-99-1-0011 as part of the SCADDS project, and was also made
44 possible in part due to support from Cisco Systems. It is freely
45 available under the GNU Public License (GPL). Up-to-date information
46 about Parapin, including the latest version of the software, can be
47 found at the Parapin Home Page:
48
49 http://www.circlemud.org/~jelson/software/parapin
50
51
52 === Installing User-Space Parapin
53
54 Installing parapin should generally just be a matter of
55
56 make
57 make install
58
59 This will install the library itself (libparapin.a) in /usr/local/lib,
60 and the header file (parapin.h) in /usr/local/include.
61
62 === The Kernel Mode
63
64 The kernel version of Parapin lets you write kernel modules that
65 tweak the parallel port. Note, this is NOT a stand-alone module!
66 The kernel personality is NOT a device driver that allows userspace
67 programs to modify the parallel port. It is kernel code that allows
68 you to write your own kernel module that uses the parallel port.
69
70 To build the kernel code:
71
72 1) Edit the Makefile; change LINUX_HEADERS to reflect the location
73 of your Linux kernel headers.
74 2) Type 'make kparain.o'.
75
76
77 === Detailed Documentation
78
79
80 Detailed information about compiling and using parapin can be found
81 in the 'doc' directory:
82
83 doc/parapin.ps: Nicely formatted postscript documentation
84 doc/parapin.html: HTML documentation, not as nicely formatted
85 doc/parapin.txt: Plain ASCII text documentation, looks even worse
86 doc/parapin.tex: LaTeX source of all the above
87
88
89 === Dire Warning
90
91 Attaching custom electronics to your PC using the parallel port as a
92 digital I/O interface can damage both the PC and the electronics if
93 you make a mistake. If you're using high voltage electronics, a
94 mistake can also cause serious personal injury. Be careful.
95
96 If possible, use a parallel port that is on an ISA card, instead of
97 one integrated onto the motherboard, to minimize the expense of
98 replacing a parallel port controller that you destroy.
99
100 USE THIS SOFTWARE AT YOUR OWN RISK.
101
102
103 Jeremy Elson (jelson@circlemud.org)
104 University of Southern California
105 30 March 2000
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.