Next Previous Contents

1. Introduction

ADAS's general purpose VME Analog Acquisition board ICV150 has 64 input channels (expandable to 256 by coupler cards) which can be used either has 32 differential or 64 single resident inputs. There is a choice of various ICV150 boards with 12, 14 or 16 bits converters, acquisition rate up to 250000 measurements/s, software programmable gain up to 128, galvanic isolation... The card has also external and software triggers possibilities with or without sample and hold stage. End of triggered sequences can be signaled by interrupts (software trigger and interrupts are not used on the ICV150 device driver).

ICV150 (icv150.o) is the VME-Linux/m68k device driver written by Integrated Real Time Systems (IRTS) for the European Synchrotron Radiation Facility (ESRF) to support up to 4 ICV150 boards. The driver has been implemented as a Linux loadable module for kernels 2.0.x and 2.2.x. This document explains the functionalities of the ICV150 device driver and the programmer's C-interface library for it.

Note that ioctl() calls are the only way to access to ICV150 devices with this driver.

The ICV150 device driver main features are :

User can read any conversion result of a scanning channel without disturbing acquisition. The channel's number is specified in arg[0] and the acquisition value is read in arg[0].

Note that the channel must be scanning when you read the value otherwise the ioctl() returned value will be EAGAIN.

User can read all the conversion results of the scanning channels without disturbing acquisition. Only scanning channels are read.

Note that the channels must be scanning when you read the values otherwise the ioctl() returned value will be EAGAIN.

If the board has a software programmable gain amplifier, user can program each channel individually to a different gain (one by one or all at the same time). When programming one channel gain, the channel's number is specified in arg[0] and the gain value in arg[1]. When programming all the gains, the gain values are specified in arg[0] for channel 0, arg[1] for channel 1...

The gain value is programmable as a multiple of 2. The value parameter and the real gain have the following correspondence :

value -> gain

0 ............... 1

1 ............... 2

2 ............... 4

3 ............... 8

4 ............. 16

5 ............. 32

6 ............. 64

7 ........... 128

8 ........... 256

9 ........... 512

10 ....... 1024

The maximum gain that can be set depends on the input module and may be smaller than 1024. This must be checked from the modules documentation as there is no means that the driver can detect this. Additionally, trying to program a gain higher than the maximum gain of the module may lead to an actual gain that is undetermined.

The gain values may also be stored to an EEPROM from which they are fetched during power-up or by user command.

Note that the gain can be read, set, stored or fetched only when the board is stopped otherwise the ioctl() returned value will be EBUSY.

As the board can be extended up to 256 channels and user doesn't always need all of them, the number of scanning channels is programmable from 1 to 256. The new number is specified in arg[0] and channels from 0 to number-1 will then be scanned.

Note that the number of scanning channels can only be set when the board is stopped otherwise the ioctl() returned value will be EBUSY.

In continuous mode, the board scans the specified inputs continuously. In external triggered mode, the scan is triggered by an external rising edge.


Next Previous Contents