[LogoShip]

Home

Daqarta for DOS Contents

Introduction

Downloads

Free Registration

Contact Us
Daqarta for DOS
Data AcQuisition And Real-Time Analysis
Shareware for Legacy Systems
(Use Daqarta for Windows with modern systems)

From the Daqarta for DOS Help system:
 
DAQARTA - STIM3A
ADVANCED STIMULUS SIGNAL GENERATOR

Digital Outputs (DigOut):

Digital Output Overview: Biphasic Pulse Stimuli - Digital vs DAC


Digital Output (DigOut) Overview:

Use the DigOut Setup item on the main menu page to enter the setup submenu system. ESC will return to the main page.

All 8 digital output bits (bit pages A0-A7, for example) are output as a single byte for each sample. Each bit may be independently programmed as a pulse generator that outputs either a single pulse of arbitrary polarity and duration, or a train of multiple pulses. Use CTRL-Pg keys to move between bit pages.

Although the DAC Pulse Wave option can provide easier control of levels, and additionally allows modulation, there are numerous applications for a purely digital approach. In particular, the availability of 8 separate outputs and TTL drive levels make this a good choice for control tasks, as opposed to signal generation.

In Dynamic RTime mode, the duration of each pulse phase is limited only by the 32-bit variable size, which is about 4 billion samples or roughly 24 hours at a 48 kHz sample rate. With one high phase and one low phase, that would give about 2 days per cycle, but you can create pulse trains with up to 4 billion cycles... over 23 million years!

In other modes you are limited by the size of the stimulus buffer, which must be shared with DAC outputs as well. STIM3A will prevent entry of any value which would cause the buffer limit to be exceeded in these modes.

When Pg Mode is set to ALL, there is only one set of bit pages available, labeled A0 through A7.

When Pg Mode is PAIR there are two sets of bit pages, A0-A7 and C0-C7. The A set controls the stimulus sequence that will be presented at the same time as the A+B components from the DACs, while the C set controls the alternate traces when the C+D components are being generated. CTRL-ALT-PgUp or CTRL-ALT-PgDn moves between the two sets, while keeping the same relative bit page (from A3 to C3, for example). Dig Pg (in the Sync menu) must be Ind to allow this independent set control, since the Lock A default forces all sets to mirror the A set.

With Pg Mode set to EACH there are four sets of bit pages, A through D, corresponding to DAC components A through D. As for PAIR mode, the CTRL-ALT-Pg keys move between sets if Dig Pg is Ind.


DigOut Bit On / Off:

This determines whether the bit page (0-7) will be active in the output when the main DigOut is active. Setting a bit page to Off forces that bit to zero... it does not remain unchanged if it was previously set high.

When DigOut is active, you must always have at least one active bit page or you will get an alert and warning:

    'Must have at least one active page per output.'
 


DigOut Sync:

This control is only present in Dynamic RTime mode. If you toggle it on, it selects that DigOut bit page as the main trigger sync when trigger Source is set to Stim. It has no effect in Intern mode.

This is needed in Dynamic RTime mode because all bits are completely independent, and may have different repeat intervals from microseconds to millenia. In the other modes, bits are independent within a given set of pages, but each page is the same duration so the sync is the same for all.


DigOut Units (Smpls / Sec):

This is a global control for the format of timing controls in STIM3A. This allows you to work in whichever format you find most relevant for your application. You can toggle back and forth as needed to see the equivalent samples or time.


PULSE:

DigOut Pulse Polarity:

The Polarity, High, and Low parameters in this section define a single pulse interval, which may be repeated as a pulse train according to parameters in the Train section.

When you toggle Polarity from Normal to Invert, the High and Low control labels change to indicate the sequence:

 +5   .-----------.
      |           |
  0 - '           `-------------  Polarity Normal
          High           Low



          Low            High
 +5 - .           .-------------  Polarity Invert
      |           |
  0   `-----------'


DigOut Pulse High / Low:

The duration, in samples or seconds, that an output bit is to remain high or low within each pulse interval. When Polarity is Normal, the High phase is before the Low phase, both in time and in the menu. Setting Polarity to Invert reverses these.

If you set only one of these values and leave the other at zero, the output will stay at the state of the one you set, regardless of the actual value entered. For example, if Low is 0 then any value you enter for High will hold the output high.


TRAIN:

The pulse interval defined in the PULSE section above may be repeated to form a pulse train:
              .--.    .--.    .--.
              |  |    |  |    |  |
 -------------'  `----'  `----'  `-----------------
  |           | Pulse | Pulse | Pulse |           |
                  1       2       3
  |-- Start --|---- Train Cycles -----|-- Dwell --|

  |----------- Overall Stimulus Cycle ------------|


DigOut Pulse Train Start:

Delay, in samples or seconds, from the start of the overall stimulus cycle to the start of the first pulse in the pulse train, as defined by the High / Low durations. If the pulse Polarity is set to Invert, the output will be high during the Start interval.


DigOut Pulse Train Cycles:

Number of pulse intervals in the total stimulus, OR, if the Smpls / Sec units control is toggled to Sec, the total duration of these repeated pulses.


DigOut Pulse Train Dwell:

The delay from the end of the pulse train to the end of the overall stimulus cycle. In RTime modes this is contiguous with the Start delay of the next cycle.

In Sequential modes there will be an additional interval between trains, due to processing and display time. This behaves like an extension of the Dwell duration. Since the display time may be variable depending upon the activity of the trace, you will probably want to use the Trigger Cycle control to provide a fixed interval. You will need to insure that the Cycle setting is long enough to include the longest display and processing time. This is best done by increasing Cycle until you get SPEC on the Speed display when the trace is as large and as busy as you anticipate, and then add some "safety margin" as desired.

If you have several different pulse trains on different output bits, you can use Start and Dwell to control their relative timing and Trigger Cycle for overall timing.

In RTime mode, there is no delay for processing and display, since that takes place in the background. You can thus use Start and Dwell to control the time between pulse trains. (There is no Trigger Cycle option in RTime mode unless you set the Trigger Source to Intern.)


DigOut Pulse Train Pad:

This is not a control, but an informational display. Its purpose is similar to Burst Pad, in that it tells how many samples have been automatically added to the effective Dwell to bring the total duration of a bit cycle up to the length of the longest concurrent bit cycle.

Pad is not shown in Dynamic RTime mode. In other modes, it shows only '-NA-' unless the bit page is active and DigOut is active (although the Master control may be Off).

This control is not present in Dynamic RTime mode because all bits are completely independent. If you are using this mode and specifically want to make a particular bit cycle match another bit cycle or the duration of a DAC burst, you can toggle RTime off (to Dynamic Sequential mode) and note the Pad value, then add it to the Dwell value. That Dwell value will then be maintained when you toggle back to Dynamic RTime.

Note that when using PAIR or EACH Page Mode with Dynamic RTime, there is not necessarily any correlation between the start of the next mode page of one bit output with that of another bit or DAC. Each bit completes the specified pulse or train of pulses for page A, then immediately proceeds to the next page (B for EACH mode, C for PAIR mode) to begin the next sequence. Use Dwell to force pages to the same alignment.


BIPHASIC PULSE STIMULI - Digital vs DAC:

Electrophysiological investigations often use biphasic stimulus pulses to avoid delivering a net charge to the subject:
   +   .-.         .-.         .-.         .-.
       | |         | |         | |         | |
    ---' | .-------' | .-------' | .-------' | .----
         | |         | |         | |         | |
   -     `-'         `-'         `-'         `-'
Typically, the stimulus is given as a current, instead of a voltage, so you would need a special voltage-to-current source. Even more importantly, the controlling computer must be electrically isolated from the subject. Special transformers or optical isolators may be used to provide the electrical isolation, and a separate high voltage battery supply is often required to provide the current.

BIPHASIC STIMULI FROM DIGITAL OUTPUTS:

If the isolator / current source accepts a proportional analog input, this biphasic pattern can be generated by summing two TTL digital outputs together and using a capacitor to remove the resulting DC level:
 +5    .-.         .-.         .-.         .-.       Output
  0 ---' `---------' `---------' `---------' `------ A0

 +5 -----. .---------. .---------. .---------. .---- A1
  0      `-'         `-'         `-'         `-'


 +10   .-.         .-.         .-.         .-.
 +5 ---' | .-------' | .-------' | .-------' | .---- Sum
  0      `-'         `-'         `-'         `-'


   +   .-.         .-.         .-.         .-.         AC
    ---' | .-------' | .-------' | .-------' | .---- Coupled
   -     `-'         `-'         `-'         `-'

To create the A0 output, set the High and Low controls to get the desired pulse width and spacing. The A1 output will use these same values, with a Start value equal to the High value and Polarity set to Invert. Leave the Train Cycles set to 1, or set both A0 and A1 to the same value to get any desired train duration. A simple circuit to sum these together might be something like:
    A0 ------R0-------.-------Co-------- AC Coupled
                      |                   Output
    A1 ------R1-------|
                      |
                      Rg
                      |
                      |
                     Gnd
If you want both phases to be equal but opposite (the usual case), make resistor R0 = R1. Typical values might be 10K. Resistor Rg attenuates the sum. If it is the same size as the other two, the output will be 1/3 of the TTL levels from the digital outputs. Note that TTL outputs are usually specified as a "nominal" 5 Volts, but may in reality be somewhat less. They may also contain some low-level high-frequency "trash", which wouldn't cause problems in digital circuits but might here if the proportional isolator / source you are driving can't deal with it.

Capacitor Co should be made as large as needed to produce pulses with tops of acceptable flatness. If it's too small, the flat tops and bottoms of the pulses will tilt like this:

       |\          |\          |\          |\
    ---' | .-------' | .-------' | .-------' | .----
         |/          |/          |/          |/
However, proportional isolator / current sources are rare, due to the difficulty of isolating analog signals. Isolating digital signals is much easier, using standard opto-isolators. A source using this approach would typically use one digital signal to turn the pulse on, and one to invert its polarity. Alternatively, it might have a separate input for each polarity, though this requires special protection against both being active at once. You can use two Digital Output bits to drive either type of device to produce a biphasic stimulus:

 Desired Stimulus from Current Source:
   +   .-.         .-.         .-.         .-.
    ---' | .-------' | .-------' | .-------' | .---- Output
   -     `-'         `-'         `-'         `-'


 Driving Pulse / Invert Source Inputs:
       .---.       .---.       .---.       .---.
    ---'   `-------'   `-------'   `-------'   `---- Pulse On
         .-.         .-.         .-.         .-.
    -----' `---------' `---------' `---------' `---- Invert


 Driving Separate Polarity Source Inputs:
       .-.         .-.         .-.         .-.
    ---' `---------' `---------' `---------' `------ Positive
         .-.         .-.         .-.         .-.
    -----' `---------' `---------' `---------' `---- Negative
 

BIPHASIC STIMULI FROM ANALOG (DAC) OUTPUTS:

If your board has analog output capabilities and you have a "proportional" type isolator / current source, you can easily create biphasic stimuli using the Pulse Wave. This allows convenient control over the amplitudes of each pulse polarity, as well as use of various modulators that are not available with digital outputs.

To create a simple pulse train, use the Pulse Wave with the Burst modulator. You can set the Rise and Fall times to 0 to give an abrupt onset and offset if you want to emulate the digital approach. The Start and Dwell times are set the same, and the Duration is set to the equivalent DigOut Cycle time.

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research