LPM-16 device driver for Linux This is a device driver for the National Instruments LPM-16 Laboratory Instrumentation card. (Actually, it is a shameless plug of Glenn Moloney's LabPC+ driver). The LPM-16 card has: 16 input 12 bit ADC (Analogue Input) 3 * counter/timer 8 bit Digital Input/ 8 bit digital Output Implemented in lpm16-0.5: ADC Digital IO ports Requires: National Instuments LPM-16 card and User's Manual. Bj0rn Ekwald's modules-1.1.87 package Linux-1.3.4 or later. /usr/include/linux/autoconf.h should correctly reflect your kernel configuration. This file is created by "make config" when compiling the kernel. To install: "make" to build the driver module "make dev" (as root) to make the special file entries in /dev/lpm16. "insmod labpc.o" (as root) to load the module into the kernel. "rmmod labpc" (as root) to unload the labpc module Demo programs: "cd demo ; make" to create the demonstration and test programs Notes: You can also supply the following useful arguments when loading the driver: "insmod labpc.o labpc_base=0x2C0 labpc_irq=9 labpc_dma=5" This command will override the default values of the board base address, interrupt request number and DMA channel. You can also change the device major (labpc_major) this way, but be careful to create the /dev/labpc/* entries with the correct major number. The DACs and counters can be programmed in a number of different modes. Selection of modes is performed by ioctl() system calls. Generally, I have followed the programming modes in the National Instruments' "Lab-PC+ User Manual". For the ADC: Most of the programming modes listed in Chapter 5 of the LabPC+ User Manual are supported - though some may need more testing. Interval scanning has not yet been implemented (but channel scanning works fine). DMA: LPM-16 does not support DMA. DIO: Only `simpleIO' implemented: read's/write's are passed as soon as possible to the I/O ports. Not synchronized in any way with the ADC, currently. ToDo: Clocks. Sync digital I/O with analog inputs, if needed. Test external interrupts. demo:some kind of `scope' which monitors a few channels of the ADC. Docs. Hmm, documentation - this is it. You really must have the National Instruments "Lab-PC User's Manual" to make sense of this stuff. Also, take a look at all the allowed ioctl's (line 454--573). Problems: mail alexp@sci.kun.nl for bugs, fixes and comments.