Re: [rtl] RTL PCMCIA ADC driver

2000-05-05 Thread David Schleef

On Mon, May 01, 2000 at 09:32:32AM -0700, Steve Rosenbluth wrote:
> 
> By the way, if anyone is interested in helping write a driver for the
> National Instruments 200kHz 16 bit pcmcia ADC, there is someone starting
> a driver in Australia: [EMAIL PROTECTED]


NI just recently sent me one of these cards (thanks, NI) and it will
soon work with Comedi.



dave...


-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] RTL PCMCIA ADC driver

2000-05-01 Thread Steve Rosenbluth

I am releasing a new revision of the RTLinux driver for the
Computerboards PCM-DAS16s/16 PCMCIA ADC card.

This is a 100kHz, 16 bit, 16 channel card. The README from the package
is attached.
The driver is available either on the FSMLabs ftp site :
ftp://fsmlabs.com/pub/rtlinux/drivers/
or at the main pcmcia ftp site :
ftp://sourceforge.org/pcmcia/contrib/

By the way, if anyone is interested in helping write a driver for the
National Instruments 200kHz 16 bit pcmcia ADC, there is someone starting
a driver in Australia: [EMAIL PROTECTED]

-- Steve Rosenbluth

file: README

/*==
das16s.cv0.03Apr 26 2000 (v0.01 Feb 17 2000)

PCM-DAS16s/16 real-time PCMCIA client driver

for RTLinux (Real Time Linux) kernels only, at present.
see http://www.rtlinux.org/rtlinux

by Steve Rosenbluth ([EMAIL PROTECTED],
[EMAIL PROTECTED])

Copyright (C) 2000 Jim Henson's Creature Shop (Los Angeles)
 all code subject to the Mozilla Public license version 1.0
==*/
   
This package should contain the following files:

README 
Makefile
config 
daq 
das16s.c
das16s.h
das16s-config.h
das16s-config.c
readdas16.c 

 
INTRODUCTION:

Welcome to the documentation of the driver for the Computer Boards
PCM-DAS16s/16 (16bit, 16 channel, 100Ksps PCMCIA ADC card) This is an
alpha release - use at your own risk.   This second release contains
major bug-fixes, and the driver exhibits different behavior than the
previous release. 

ComputerBoards now sells both the original "PCM-DAS16s/16" and a new
version with improved connectors and a slightly different register set.
The newer card is not yet supported by this driver.

das16s was developed on RTLinux 2.0 for Linux kernel 2.2.13 and
pcmcia-cs 3.1.8 . It has not been tested on anything else.

das16s is a standalone device, open() a file descriptor to it, use
ioctl() to configure it and read() to get data out of it.  It obtains a
dynamic device major number at load time, at present the device minor is
always 0.

The card is currently operational in continuous and "burst" mode.  Note
that "burst mode" was designed for the use of an external analog
multiplexer and an external digital multiplexer (which you probably
don't have) each of which can switch into one of four "banks". A "burst"
lasts from 1 to 4 channel-scans(banks), at present.  To those without an
external multiplexer, multiple banks may be useful for filtering analog
data, etc. Acquisition STOPS at the end of a burst. Use this mode for
software-triggered scans.

Continuous mode has been tested, but not extensively. A user space app
might miss samples in this mode due to the lack of blocking IO unless it
busy loops on the device read. But this should be useful for
oscilloscope apps, etc. Note that the driver implements a ring buffer
for conversion results.  If this buffer overflows in continuous mode,
the oldest result packet gets thrown out to make space for a new result
packet. A read of the device will always return the oldest sample packet
available, somewhat like a FIFO.

The driver is geared toward "channel-scans", or "banks", of ADC
channels. Single channel conversions have not been tested (try
specifying a scan of 1 channel). Also because of this bias, the driver
always delivers a packet large enough to contain 16 analog conversion
results when its device is  read. Digital input bits are also in this
packet.


HOW TO LOAD DAS16S:
--
To compile, the "das16s*" sources should be put into the pcmcia
distribution's "clients" directory. Then modify the Makefile in the
clients directory to include the following near the top of the file :

SRCS := ${SRCS} das16s.c
EXTRA := ${EXTRA} das16s.o

A sample Makefile is supplied here, You can diff it with the original to
see what is changed.  After a make, copy the das16s.o module to
/lib/modules/2.2.13xx/pcmcia/

You must be running a RTLinux kernel to use this driver.  You must also
have compiled and installed the RTLinux 2.0 modules for all dependencies
to resolve correctly. See http://www.rtlinux.org/rtlinux

To create module dependencies do: 
'depmod -a'

To load the driver, you must modify the "config" file in /etc/pcmcia to
add bindings. add the following near the top of the file:

device "das16s"
  class "daq" module "misc/rtl_fifo", "das16s" 

Then add the following near the bottom of the file:

card "Computer Boards PCM-DAS16S/16"
  version "ComputerBoards, Inc.", "PCM-DAS16S/16", "(c)1996", "Rev2.0"
  bind "das16s"  

A sample "config" is supplied here, diff it with the original...

You must also add a "daq" file in the /etc/pcmcia directory to create
the device node. A sample file is supplied here - make sure it has
execute permissions ! The module will fail to load at insertion if this
is not done.

Insert the card, or,