Daqarta for DOS Contents



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:



Use the DAC 0 or DAC 1 Adjust item on the main menu page to enter the corresponding adjustment submenu system. ESC will return to the main page.

There are 4 separate tone component submenu pages, which you can move among with the CTRL-Pg keys.

On / Off:

This determines whether the tone component page (A, B, C, D) will be present in the output when the indicated DAC channel is active. You may have any or all of the components active at once. All active components will be added together to build the actual stimulus output for that channel if Pg Mode is set to ALL, while in PAIR mode A and B will be added to form one stimulus, with C and D added to form the alternating stimulus. If a component is off in EACH mode, or a pair is off in PAIR mode, the corresponding stimulus will be off.

For any active DAC output, you must always have at least one active page or you will get an alert and warning:

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

Freq Hz:

This sets the frequency of the output sine wave from 0 to 65535 Hz. Normally, only integer values are allowed. The Step Hz/N control on the Misc menu page, however, allows Freq to automatically adjust itself to the nearest value that gives proper alignment for continuous tone production in RTime mode or other special applications.

The frequency should be less than half the sample rate, or you will get "aliasing" down to frequencies lower than you intend. Ideally, you want to use low tone frequencies and high sample rates so there will be many output samples per cycle of tone for a good approximation of a sine wave. Theoretically, a sine generated with K samples per cycle will have no distortion products below the Kth harmonic.

If you can't arrange to sample at a high enough rate (possibly by use of Sample Factor oversampling) for the tone frequency you need to generate, consider using an external low-pass reconstruction filter to reduce the worst of the harmonics.

Also, consider if you really need to worry about these harmonics. If you will be presenting tones to a human subject, for instance, you don't generally need to worry about harmonics above 20 kHz. So if you want to use tones up to 16 kHz, and your sample rate is over 40 kHz or so, you probably don't have anything to worry about. Your subject surely won't hear even the second harmonic of your 16 kHz tone (at 32 kHz), much less any higher ones. Just be sure any power amplifiers, etc, that must handle the stimulus will not behave poorly in the presence of these upper harmonics. This is not usually a problem with modern equipment, but if it is you can often cure things with a very simple low-pass filter made from a single resistor and capacitor.

Phase degrees:

This sets the starting phase of the sine wave tone component, in hundredths of a degree from 0 to 360. The actual output resolution is one part in 8192 per 360 degrees, or about 0.044 degree. If you enter a negative value, it will be converted to the equivalent positive value (-90 = 270, etc).

This is the phase when the wave actually starts at the beginning of the Rise samples, which may be delayed by Start samples. With a large (slow) Rise, the initial output samples will be too small to discern the phase at that point, but you can see its effect upon later samples.

Start delay:

This is a delay in samples before the sine wave component begins. Its primary use is to delay a component relative to other components. For example, you may want to generate two or more tone bursts during one stimulus interval. If the second burst must start 10 msec after the first starts and the sample rate is 40 kHz, you would set the second Start to 40000 * 0.010 = 400 samples. This would be the case whether the first burst was another component of the same DAC channel or the other DAC channel. Similarly, you could delay a tone to take place after a certain digital output pulse.

Rise duration:

This is the number of samples the tone component will take to rise from completely off to completely on. The shape of the rise is that of a cosine-power function, whose exponent is controlled by the Shape option in the main Misc menu alternate page.

By making the rise longer, or the exponent smaller, you reduce the amount of "spectral splatter" or audible click associated with the onset of the tone. In a detection experiment, the click might be audible where the tone itself is not, giving a misleading result.

But if you are determining the subject's detection threshold by recording neural responses, you must also take care not to make the rise too long, either, as explained below in the Rise/Fall Practical Example.


To see the effects of the rise (and fall) time on the width of the spectrum, look at the stimulus itself by connecting a DAC output to the acquisition input. (Alternately, you may use the dummy board driver DEMO.ADC in place of a real board driver in your DQA.CFG file. When the stimulus generator DAC 0 is active, this driver just passes the stimulus through to DEMO Ch 0 as though it were acquired data.)

Set Start to zero and Sustain to about 128 samples. With a sample rate of 20 kHz, set Freq to 2000. Set Rise and Fall to 128 samples each. In Sequential mode, you should see a single tone burst which takes up the first 384 samples of the waveform trace. Flip to the power spectrum display with the F-key and Y-key. Note the width of the spectrum spread on either side of 2000 Hz as you cut Rise and Fall in half to 64 samples each. Keep cutting these in half and watch the spectrum widen further.


For auditory evoked responses, a rise time of about 1 msec is commonly used. If you use a shorter rise time, the subject will appear to be more sensitive because the wider spectrum stimulates the firing of more neurons from adjacent frequency regions. This gives less information about the true sensitivity at the frequency of the tone.

As you lengthen the rise time, however, the response gets progressively smaller. This is because an evoked response is the summation of many neurons firing at once. Since the individual firing rates and threshold sensitivities of these neurons are not all alike, to get them to fire at the same time you must give a stimulus that quickly goes from below all neuron thresholds to above many neuron thresholds.

Each neuron will thus start its pulse train at the same time, so all the initial pulses will be superimposed to form the evoked response peak. But subsequent neural pulses will not be in synchrony, so the response rapidly falls. With a slow rise time, the different neural thresholds are reached at differing times, so the number of pulses superimposing to form the evoked response is reduced.

Sustain duration:

This is the number of samples for which the tone component will remain at its maximum Level.

Fall duration:

This is the number of samples the tone component will take to fall from completely on to completely off. It is the reverse of the Rise portion and uses the same cosine-power Shape. You will probably want Rise and Fall to be equal for most experiments, but they have been made completely independent here to allow for special cases.

Level %:

This scales the full-on Sustain level to an arbitrary value. It is intended mainly for relative scaling among the tone components. Since it acts on the digital representation of the stimulus, it is most definitely NOT a replacement for a separate attenuator to control overall level. Consider that a full 16-bit DAC would use 65535 steps (+32767 to -32767) to form a smooth approximation of a sine wave. If you wish to reduce this output by 60 dB (to 0.1%), the output wave would range over only 65 steps... equivalent to a DAC with only about 6 bits! This "chunky" waveform would produce considerably more distortion than the original... about 60 dB more.

On the other hand, a separate attenuator that acts on the analog output of the DAC could preserve the 16-bit approximation and the corresponding low distortion. This could be an internal or external digitally-controlled analog attenuator, or a manual knob-type unit, or even a simple potentiomenter "volume control".

Although you wouldn't want to use Level as the only attenuator in your system, you can use it to "trim" an attenuator that has only coarse steps. For example, if your attenuator has steps of 6 dB each and you need 1 dB resolution, you can use Level alone to set any effective attenuation from 0 dB (100.0%) down to 5 dB (56.2%), then set the attenuator to 6 dB and set Level to back 100% or 0 dB for steps from 6 to 11 dB. You can continue this process to get any desired amount of attenuation while never setting Level below 50%, an equivalent of losing only 1 bit of resolution.


 dB  Level %   dB  Level %   dB  Level %   dB  Level %
 0.0 100.0     2.0  79.4     4.0  63.1     6.0  50.1
 0.1  98.9     2.1  78.5     4.1  62.4     6.1  49.5
 0.2  97.7     2.2  77.6     4.2  61.7     6.2  49.0
 0.3  96.6     2.3  76.7     4.3  61.0     6.3  48.4
 0.4  95.5     2.4  75.9     4.4  60.3     6.4  47.9
 0.5  94.4     2.5  75.0     4.5  59.6     6.5  47.3
 0.6  93.3     2.6  74.1     4.6  58.9     6.6  46.8
 0.7  92.3     2.7  73.3     4.7  58.2     6.7  46.2
 0.8  91.2     2.8  72.4     4.8  57.5     6.8  45.7
 0.9  90.2     2.9  71.6     4.9  56.9     6.9  45.2

 1.0  89.1     3.0  70.8     5.0  56.2     7.0  44.7
 1.1  88.1     3.1  70.0     5.1  55.6     7.1  44.2
 1.2  87.1     3.2  69.2     5.2  55.0     7.2  43.7
 1.3  86.1     3.3  68.4     5.3  54.3     7.3  43.2
 1.4  85.1     3.4  67.6     5.4  53.7     7.4  42.7
 1.5  84.1     3.5  66.8     5.5  53.1     7.5  42.2
 1.6  83.2     3.6  66.1     5.6  52.5     7.6  41.7
 1.7  82.2     3.7  65.3     5.7  51.9     7.7  41.2
 1.8  81.3     3.8  64.6     5.8  51.3     7.8  40.7
 1.9  80.4     3.9  63.8     5.9  50.7     7.9  40.3

If you set Level to 0.00%, that tone component page goes Off and is simply omitted from the output. However, you must always have at least one active component for any active DAC output, so if you try to set 0.00% on the only active page, you will get an alert and warning message:

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


Each tone component page may be set independently, but since all components for a given channel are summed, the Levels for any components that overlap must not sum to more than 100%. For example, if you use two components to create two separate sequential tone bursts, you may set both Levels to 100%. If the second Rise starts before the first Fall is complete, you must make sure that the middle of the first Fall comes before the middle of the second Rise, or they will total over 100%. If they will both be on simultaneously, then you must proportion the levels accordingly.

The stimulus waveform display will show the possible overlap areas, but since it is small you should not rely on it to insure there is no distortion... compute the sum of Levels if there is any doubt.

If possible, consider putting one component on each output channel and sum the DAC outputs externally with a mixer.


This is typically a problem when you are generating two tones from the same speaker or other source at high sound levels. Since any source is nonlinear at high levels, the sound output will include not only the two tones you desire (plus harmonic distortion products from each), but also intermodulation distortion products at inharmonic sum and difference frequencies. You must particularly minimize the intermodulation products if you are studying similar products that are generated by nonlinearities in the system under test... such as an ear or a microphone.

One approach is to generate the tones from separate DAC channels and use them to drive separate amplifiers and speakers, with the sound mixed together acoustically. Since air is much more linear than any driver, the intermodulation will be greatly reduced. Some small amount may remain, particularly if the sound must be mixed in a closed system, due to sound pressure from one source moving the other. Note that this technique does nothing to reduce HARMONIC distortion, which is generated separately from each source.

Using the Step N mode to generate the two tones will insure that they fall exactly on spectral lines, along with all harmonic and inharmonic distortion products, to allow simple measurements without "skirts".


Questions? Comments? Contact us!

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