---------A few drivers and a demo routine for using (some of) the i/o boards manufactured by LPTek. This software is freely distributable under the GPL. Written and provisionally tested in 9/98 by Bill Softky (bills@intrinsa.com, mrbill@alumni.caltech.edu); comments welcome. About LPTek boards: LPTek is a small company providing very helpful tech support ((516) 333-8820 www.lptek.com I purchases these boards because the LPtek system is both very cheap (about $500 could get me 8 D/A and 8 A/D channels), because it all connects to the parallel port (externally!), and because it is quite expansable (in principle to 16 sub-boards, or 8x16 analog channels in all). I have also included drivers for the digital IO board (48 channels), but not for the counter-timer board. All in all, it seems like the most flexible, small, cheap, and modular product I've seen.... BUT it's nearly impossible to infer how things work from their documentation, so I hope the results of my experimentation help. About the drivers: // The routines here address the parallel port (assumed to be // 0x378,0x379, 0x37A) to access various io boards of the LPTek bus. // Only the 8bit adc, 8bit dac, and 48 bit io boards are covered here; // LPTek also sells 12 bit adc and dac boards, and a counter-timer, which // presumably use very similar instructions. // These routines were written with extensive help from LPTek's // technical guru Saul, and include essential tricks which are NOT reported // in LPTek's own documentation. Most of the quirks I have found are documented at the relevant portion of the code. Here is a brief summary: -- You need to issue a "read" command to make the DAC write data (?!?). -- On the current-driver board LPT24HDV, a current-amplifier for the digital io board, the jumpers come preset to *disable* the output; you actually have change the factory setting to make the board work at all. -- The order of msb <--> lsb is left-right reversed on the DAC. -- In some cases you need to write the board and channel numbers together in a single command; in other cases, they must be written separately and sequentially. -- The polarity of the power supply into the "TMC Port" box is unlisted (and for me counterintuitive). -- Reading input requires (as LPTek does document) a perverse sequence of reads and shifts to get a single byte in. About the demo program: The makefile should build the program properly; compilation and running can be tested even without having lpTek boards installed (you'll just get nonsense answers), because all the program does is read to and write from the parallel port in perverse ways. Any process using these commands must be run as root, in order to gain permission to access the parallel port. The demo program contains sections to do all the read and write commands I wanted to, but random portions of them are commented out. The best way to try is to comment out all pieces but the one you want to test. Enjoy, and let me know if this is useful. Bill