Date: Sat, 15 Nov 1997 11:27:38 -0800 (PST) From: "Jamil J. Weatherbee" <jamil@trojanhorse.ml.org> To: freebsd-hackers@freebsd.org Cc: dufault@hda.com Subject: AIO8-P/AT16-P Analog Driver Complete (Major Number Requested) Message-ID: <Pine.BSF.3.96.971115103407.3990A-100000@trojanhorse.ml.org>
next in thread | raw e-mail | index | archive | help
A truly reasonably priced analog input board. I am now officially requesting a major number (I see that the teletype driver got one within a week, which makes me wonder why my previos Digital I/O driver was not taken seriously at all). However I have spent a considerable amount of time on an analog input board driver. This board is intended to be used with an accessory multiplexer (not required). The per channel cost is about $26, and can be expanded to 128 channels, all channels are 12-bit. I have included the manual page below for your viewing pleasure: AIOX(4) FreeBSD Kernel Interfaces Manual (i386 Architecture) AIOX(4) NAME aiox - Industrial Computer Source AIO8-P driver SYNOPSIS device aiox0 at isa? port 0x260 tty irq 5 vector aioxintr DESCRIPTION This driver supports the Industrial Computer Source AIO8-P 8-Channel 12-Bit Analog Input board. This board provides 8 12 bit, single-ended analog input ports. The driv- er also directly provides support for up to 8 daisy chained AT16-P Pro- grammable Analog Multiplexers with 16 Differential Inputs. This makes it possible to sample up to 128 differential channels with a single inter- face board. Use of at least one AT16-P is highly recommended as the AIO8-P offers no signal conditioning options and only operates in a -5 to +5 Volt input range. However, if you wish to use the AIO8-P standalone, insert the following into your kernel config(8) file: options AIOX_CHANNELS=8 Selection of the input port is through the minor number: The 9 bit minor number format is UUCCCCMMM, where UU: board unit (0-3) CCCC: external multiplexer channel (0-15) (on AT-16P units) MMM: internal multiplexer channel (0-7) (on AIO8-P card) devfs(5) device node names are of the form: aiox[0-3][a-p][0-7] IOCTL The following ioctl(2) calls apply to aiox devices. Their declaration can be found in the header files <sys/aioxioctl.h> and <sys/dataacq.h> AD_MICRO_PERIOD_SET Takes a pointer to a long argument specifying the number of microseconds between samples. Half of this is used as the external multiplexer settling time and the other half as conversion time. AD_MICRO_PERIOD_GET Takes a pointer to a long argument and returns the current number of microseconds between samples. AD_START Starts the clocked accumulation of sample values in- to a channels driver fifo. When a channel is first opened its software fifo is initialized in the stopped state. This is to prevent high sample clocks from overrunning the fifos before the user is ready to read from the channel. AD_STOP Stops the clocked accumulation of sample values into a channels driver fifo. BUGS On the AIO8-P, interrupt driven conversion (the only type supported by the aiox driver) is facilitated through 8253 timer #2. In order for in- terrrupts to be generated you must connect line 6 to line 24 (counter 2 output to interrupt input) and line 23 to line 29 (counter 2 gate to +5VDC). Due to the design of the AIO8-P this precludes the use of pro- grammable gain control. A 64 entry (128 byte) software fifo is provided for each analog channel. Reads are non-blocking on the aiox driver, so providing a read(2) buffer channels. Using this method, multichannel sample rates as high as 16,000 samples/sec have been observed. Sample rates lower than 32 Hz are not supported. SEE ALSO http://www.indcompsrc.com/products/data/html/aio8g-p.html http://www.indcompsrc.com/products/data/html/at16-p.html AUTHOR Jamil J. Weatherbee <jamil@trojanhorse.ml.org>. FreeBSD November 14, 1997 2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971115103407.3990A-100000>