DAS8JR BOARD DRIVER:


INTRODUCTION:

This single DAS8JR driver is designed to support several boards from Computer Boards and CyberResearch. Supported board models and features include:

                      MANUFACTURER'S SPECIFICATIONS:
                       ADC     Speed      DACs
                       Bits    µsec     # x Bits
  Computer
  Boards:
  CIO-DAS08/Jr          12     25         none
  CIO-DAS08/Jr-AO       12     25        2 x 12
  CIO-DAS08/Jr/16       16     30000      none
  CIO-DAS08/Jr/16-AO    16     30000     2 x 16

  CyberResearch:
  CYDAS 8JR             12     25         none
  CYDAS 8JRAO           12     25        2 x 12
  CYDAS 8JRHR           16     30000      none
  CYDAS 8JRAOHR         16     30000     2 x 16

All models have 8 single-ended +/- 5 Volt full-scale analog inputs, plus 8 digital input and 8 digital output lines. AO (Analog Output) models have +/- 5 Volt output ranges, nominally 100 kHz max. Both DACs are updated simultaneously.

None of these boards has a built-in pacer clock, so this driver uses the main system timer to control all sample timing.


DAS8JR CONFIGURATION PARAMETERS:


PARAMETER OVERVIEW:

This driver allows you to specify certain parameters on the DAS8JR.ADC line, which must be the second line of the DQA.CFG file. Each parameter is given as a letter and colon, followed immediately by a value or text string. Use a space between parameters. For example:
    DAS8JR.ADC    A:h310 M:DAS08/Jr-AO
The order of the parameters is not important for this driver, with the exception that the M: parameter to set the model type also sets the super-slow 30000 µsec conversion speed for CYDAS 8JRHR and 8JRAOHR models. If you need to use the S: parameter to modify this from the default, give it after the M: setting.

The parameter letters are case-insensitive, as are the entries that follow the colons.

Daqarta does not use any SET lines in your AUTOEXEC.BAT file, nor does it use any non-Daqarta drivers or libraries that may have been supplied by your board manufacturer.

You can check to see which parameters have been set, either via the configuration line or by default, by checking the board information summary available via the ALT-H Plug-In Help system. This also shows a summary of the default values for all parameters. There is no need to enter any parameter that is the same as the default value assumed by the driver.


A: ADDRESS:

Use this to tell Daqarta the base I/O address for your board. This should match the value selected by the DIP switches on the board, which usually comes from the manufacturer with a default setting of 300h (hexadecimal). To alert the Daqarta parameter parser that the value is in hexadecimal, precede it with an 'h', as in:
    DAS8JR.ADC   A:h310
The default address assumed by the driver is h300.

The value you enter is not validated against any standard list. Daqarta looks for the board at the address given, and if it does not find a valid DAS8JR compatible board there it exits with:

    'DAS8JR board not found.'
The only exception is if you set A:0 to allow viewing of this board Help system without having a board installed or properly configured.


B: BITS PRESET:

This forces the data width to 12 or 16 bits. This parameter is not needed if you use one of the supported models and specify it with the M: parameter. The B: option is to support new models that may arise in the future, since board makers are beginning to upgrade some of their products from 12-bit to 16-bit ADC chips.

This driver already supports four different 16-bit models, but note that the AO versions of these have 16-bit DACs to match. If a new model arises that has 16-bit ADCs but retains the 12-bit DACs, you could "fake" it by specifying one of the 12-bit AO models and also supplying the B:16 parameter, which only applies to the ADC.


C: CHANNEL PRESET:

This parameter allows you to change the default channel that will be used when you first activate this driver via the Board option. Valid channel numbers are 0 through 7. For example:
    DAS8JR.ADC   C:3
would set channel 3. You may change the channel from the board's control menu during operation.


F: HELP FILE OMIT:

This driver normally attempts to load this associated Help file on start-up, and exits with an error message if it can't find it. Setting F:0 on the ADC configuration line tells the driver not to look for the file. You would probably only want to use this option if you are really short of DOS memory, since loading the Help file only increases memory use by a few hundred bytes for its separate link stack and directory. (The file itself shares the text buffer of the Main Help file.)

Note that ALL Help files, including main, can be omitted via an F:0 parameter on the INIT line (first line) of the DQA.CFG file. If this is present, no individual module Help will be loaded.


M: MODEL NAME:

Use this command to tell the driver which board you have. For example, if you have a CIO-DAS08/Jr-AO board, the ADC line in your configuration file might look like:
    DAS8JR.ADC   M:DAS08/Jr-AO
If you enter an unsupported model name, Daqarta will exit with:
 'M: Model not recognized.  Supported models are:
  Computer Boards:
    DAS08/Jr
    DAS08/Jr-AO
    DAS08/Jr/16
    DAS08/Jr/16-AO
  CyberResearch:
    CYDAS-8JR
    CYDAS-8JRAO
    CYDAS-8JRHR
    CYDAS-8JRAOHR'
The models must be specified as shown, although case doesn't matter. Do not use a CIO- prefix for Computer Boards models. Also, since the Daqarta parameter parser uses spaces as separators, no embedded spaces may appear within a parameter string. For this reason, CyberResearch models must use a hyphen that is not part of the true model number, such as CYDAS-8JR for the CYDAS 8JR model.

For boards from other makers you must use the closest equivalent model from the above list. Compare the features of your board with those in the features table to assist in this determination.

If you omit the M: parameter, a basic DAS08/Jr board will be assumed.


P: PARALLEL PORT ADDRESS FOR STIMULUS USE:

The P: parameter specifies a parallel port to be used for digital output via the STIM3 Stimulus Generator or equivalent. You can use the built-in 8-bit digital output port for this, or a separate 8255-type port board, or any available LPT printer port.

To specify the internal port, use:

    DAS8JR.ADC   P:I
If you do this, the built-in digital output bits will not be available for Pulse output. The 'Pulse' item in the Board menu will change to 'DigOut' and instead of allowing you to select a bit number it will always show 'Stim'.

USING AN 8255 PORT FOR DIGITAL STIMULUS OUTPUT:

The 8255 is the most popular digital IO port chip, available on separate boards like the PIO-24 or PIO-12 from Keithley Metrabyte, the Computer Boards CIO-DIO24, the CyberResearch CYDIO 24, and many others. You can also use just the 8255 portion of multi-function boards that may include such things as counter-timers or additional IO chips.

An 8255-type port occupies 4 consecutive addresses: Port A, Port B, Port C, and a Control Port. The Port A address is always used to indicate the base 8255 address. You should give the address in hexadecimal notation by preceding it with an 'h', as in:

    DAS8JR.ADC   P:h310
This would specify Port A at 310 hex. If you want to use Port B or Port C for output instead, do NOT "adjust" this base address to 311 or 312... the driver needs the true base address in order to find the Control Port. Instead, we use a trick: Since A, B, and C are perfectly valid hexadecimal digits, the driver employs special tests to allow you to use the form P:h310B to specify Port B and P:h310C for Port C. Port A may be specified this way as well, if you want the parameter line to serve as a reminder of which port is in use... but it's not really needed, since Port A is the default.

Note that only the selected A, B, or C port is set to be an output... the other two ports are set as inputs. This allows other equipment to stay wired to them for other applications, since the inputs will just be ignored here. If the other application expects these to be inputs and there are active device outputs connected to them, then of course you don't want them to be forced to any possibly conflicting state.

However, suppose the other application uses those ports as outputs, and you want to leave device inputs connected to them while you run the current application. In this case, you can't assume that those device inputs will never be activated: The pins of the 8255, even though set as inputs, will have some indeterminate high or low voltage state unless they are loaded with around 5000 ohms or less. If your device inputs don't provide this load, you could be in for a nasty surprise when the other device activates unintentionally.

CAUTION:
To avoid unexpected missiles launches, third stage booster explosive squib detonation, ten-ton hydraulic ram activation, or even just a simple guinea pig food pellet dispenser cycle, be SURE to provide a few thousand ohms load to any critical device inputs that you must leave enabled but don't want to activate. Connect the load resistor from the device input to ground or +5 Volts, as appropriate to insure the desired state of the device.

When the other application later makes the port an output, it will have no trouble driving the device to either state with this "pull-up" or "pull-down" resistor present. Of course, if you are SURE that your device inputs already provide adequate loads, go ahead and skip the resistors...

USING AN LPT PRINTER PORT FOR DIGITAL STIMULUS OUTPUT:

This option uses a conventional LPT or "Line PrinTer" port to obtain 8-bit digital output capabilities where you want to keep the built-in port available for Pulse operation. These standard printer boards are much more readily available than 8255 boards, and they are much less expensive. To use this option with the P: parameter you must the form:
    DAS8JR.ADC   P:Ln
where 'n' is the LPT number from 1 to 4. The printer port outputs will then be available for use by the DigOut option of the STIM3 Stimulus Generator.

If the LPT 'n' value is not in the range of 1 to 4, Daqarta will exit immediately with:

    'LPT value out of range.'

Most computer systems come with a single standard printer port, and if you need more than that you will have to install a separate board. All DOS systems can support ports LPT1 through LPT3 "naturally", without special software. The system BIOS keeps a record of the location of each LPT that it recognizes, and that record is consulted to validate the LPT value that you use here. If there is no entry for the LPT number you give (L:3 in this example), Daqarta exits with a message like:

 'LPT3 not recognized by BIOS.'
 'BIOS recognizes only LPT1 to LPT2.'
where the message will reflect actual LPT availability.

Problems may be due to adding a new printer port board and getting the jumpers or switches wrong. Most boards allow designation as LPT1 or LPT2. If you need to add LPT3, be sure the board allows it before you buy. Some boards allow LPT4 use, but not all systems support this. For example, IBM PS/2 systems use the LPT4 location in the BIOS data area for other purposes.

You can use the LTEST.EXE utility supplied with Daqarta to see the port addresses corresponding to each LPT, as read from the BIOS data area just like this driver does. A typical display would be:

  Printer Port assignments:
     LPT1: 0378h
     LPT2: 0000h
     LPT3: 0000h
     LPT4: 9FC0h
In this example, only LPT1 is installed, at address 378h. LPT2 and LPT3 are available, but the LPT4 pointer is clearly in use for something else. LPT ports are always assigned consecutively by the BIOS, so this can't be a hidden port. It's also beyond the highest possible port address of 3FFh.

Even if LTEST shows that the LPT4 location is available to install a new port, you may need to run special software (supplied with your port board) to make use of it... not all BIOSes will assign this automatically on start-up.


S: SPEED:

This parameter specifies the overall ADC conversion speed, in microseconds. It must be an integer between 5 and 40000. The default setting for the 12-bit models is equivalent to: DAS8JR.ADC S:25 or 25 microseconds, for a 40 kHz maximum sample rate. For the 16-bit boards the default is 30000 microseconds.

This value is used as a limit when setting sample rate under menu control, and is only there as a safety net to prevent you from setting the rate so high that you get bad data. Although no DAS8JR boards are known to convert anywhere near as fast as the 5 microsecond parameter limit at present, board makers and ADC chip makers are continually working to increase speeds.

So how do you determine when you are sampling too fast for your converter? The best way is to use a known input waveform and just keep increasing the sample rate. You will get to a speed where the waveform begins to get noisy and spiky. In RTime mode you may find that you can't run as fast as in Sequential mode... be sure to test both.

Also, in RTime mode if you adjust the sampling rate to get the fastest setting that just eliminates spikes, you may find that the spikes reappear on each keystroke unless you slow the sample rate a lot more. You may want to avoid operating in this "twitchy" range for normal work, but it can be used if you are aware of the limitations and don't use any keystrokes during averaging or DDisk recording, for example.

Since the DAS8JR-family boards have no built-in pacer timers, sample timing resolution is in multiples of the main system timer resolution of 0.838 microseconds.

For example, a typical 386DX40 system in Sequential mode could run at a sample period equal to the full rated 25 µsec ADC conversion speed, but the timer resolution allows only 25.143 µsec (39.773 kHz sample rate) because the next step at 24.305 µsec is too fast for the ADC. In RTime mode on this same system, even 25.143 µsec is a bit too fast, but the next slower step of 25.981 µsec is fine... as long as no keys are being hit. Sample periods of around 36 µsec or more (27.7 kHz or lower sample rates) are needed to insure that there are no spikes during keystrokes in RTime mode.

If you use stimulus oversampling (Stimulus Generator Factor greater than 1), you may be able to have the effective stimulus output rate exceed these limits, because the outputs can run faster than the ADC. Daqarta refers to this as "Hypersampling". The DAC limit is specified at 100 kHz, but you may even be able to go beyond that. If you have a fast system and want to push your DACs to the limit, you might want to check the output waveform with an external oscilloscope, if one is available, to allow you to see spurious spikes that may be too brief for the ADC to detect when viewing the waveform with Daqarta.

On the 386DX40 system in Sequential mode, a single DAC output runs fine up to about 149 kHz. With both DACs active, the maximum is reduced to about 119 kHz... an aggregate output of 238 kHz while still maintaining input sampling. You can reach these limits by various combinations of base sample rate and Stimulus Factor:

 One DAC channel, Sequential mode:
     ADC Rate  x  Factor  =  DAC rate
     18.664 kHz     8        149.15 kHz
     29.830         5        149.15
     37.287         4        149.15

 Both DAC channels, Sequential mode:
     19.887         6        119.32 (each)
     39.773         3        119.32 (each)
In RTime mode, the upper limits are reduced due to the interrupt overhead for each sample, and the need to do display updates at a minimal rate:

 One DAC channel, RTime mode:
     ADC Rate  x  Factor  =  DAC rate
     19.887 kHz     4        79.55 kHz

 Both DAC channels, RTime mode:
     19.887         3        59.66 (each)

If you try to run with Factor and sample rate combinations too high for your system, Daqarta will give an alert and show a
    'Sample rate overrun!'
message. If RTime mode was active, it will be forced back to Sequential. This prevents lockup in case you give the system so much to do during each sample interrupt that there is no time for any other processing between the RTime interrupts.

Digital outputs can usually go quite a bit faster than DACs. For example, with a Stimulus Factor of 10 on the 386DX40 system mentioned above, you can generate digital outputs at a sample rate of 19.887 kHz in Sequential mode, giving a digital output sample rate of 198.87 kHz.

SPECIAL NOTES FOR 16-BIT MODELS:

Since the maximum ADC sample rate with these boards is only 33 HERTZ (not kiloHertz), they can be rather unwieldy to use. In particular, it takes over 15 seconds at this rate to acquire 512 samples for display, so waiting for screen updates can be quite frustrating.

Unless triggered operation is really needed for your application, you should toggle Trig off and use the resulting Free-run mode instead. You will also need to be in RTime mode, allowing overlap operation. Now the trace will update on nearly every sample, and waveforms will seem to scroll slowly across the screen from right to left. The most recent data will always appear at the right end of the trace, so you can see any changes immediately.

You are still getting only one complete new trace per 15+ seconds, but at least you can see what's happening in the meantime. When spectra are viewed, they will respond continuously but slowly to changes. For example, if there is a sudden jump in the frequency of an input tone, you will see the original peak melt away and a new one grow... the whole process again taking the same 15+ seconds.

Despite the sluggish 16-bit ADCs on these models, the 16-bit DACs on the AO versions are still capable of 100 kHz operation just like the faster 12-bit models. To make use of this speed you will need to use large Stimulus Generator Factor settings.

For example, to reach 100 kHz in Sequential mode when the ADC rate is 33 Hz, you need to set Factor to 3030. This means that the samples in the stimulus buffer are consumed 3030 times faster, so with the maximum buffer size of 64 Kbytes and a single DAC channel active (two 8-bit bytes per 16-bit sample), the total stimulus lasts less than 0.33 seconds... just the first 10 ADC samples!

And in Sequential mode, the stimulus repetition rate is limited by the time to acquire each sweep, so here you would only get one stimulus every 15+ seconds at best.

In RTime mode, however, the stimulus buffer recycles over and over endlessly, so the stimulus duration and repeat cycle are the same... in fact the problem here may be that stimuli come too often: In the above example, the SLOWEST stimulus repeat rate would be 3 per second. To go faster, just use shorter stimuli. The "off" time between stimuli is created by means of the stimulus Start delay time.

One caveat here: The sensitivity of the overrun detection system is reduced by large stimulus Factors in Free-run RTime mode, so if you set Factor too large for your system you may get s-l-u-g-g-i-s-h keyboard response without tripping the overrun detector. The stimulus and data will be unaffected, and it's OK to run like this if you really need to, but you will have to watch every keystroke to make sure it's accepted before you hit the next key.


GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH: Over 20 Years of Innovative Instrumentation
© Copyright 1997 - 2001 by Interstellar Research - tech@daqarta.com