Analog Inputs
Setting up the inputs
(c) Spectrum GmbH
67
Please note that this is a general example and the number of input channels may not match the number of channels of your card.
Input termination
All inputs of Spectrum’s analog boards can be terminated separately with 50 Ohm by software programming. If you do so, please make sure
that your signal source is able to deliver the higher output currents. If no termination is used, the inputs have an impedance of 1 Megaohm.
The following table shows the corresponding register to set the input termination.
Automatic adjustment of the offset settings
All of the channels are calibrated in factory before the board is shipped. These values are stored in the on-board EEProm under the default
settings. If you have asymmetrical signals, you can adjust the offset easily with the corresponding registers of the inputs as shown before.
To start the automatic offset adjustment, simply write the register, mentioned in the following table.
Before you start an automatic offset adjustment make sure, that no signal is connected to any input. Leave
all the input connectors open and then start the adjustment. All the internal settings of the driver are changed,
while the automatic offset compensation is in progress.
As all settings are temporarily stored in the driver, the automatic adjustment will only affect these values. After exiting your program, all cal-
ibration information will be lost. To give you a possibility to save your own settings, most Spectrum card have at least one set of user settings
that can be saved within the on-board EEPROM. The default settings of the offset and gain values are then read-only and cannot be written
to the EEPROM by the user. If the card has no user settings the default settings may be overwritten.
You can easily either save adjustment settings to the EEPROM with SPC_ADJ_SAVE or recall them with SPC_ADJ_LOAD. These two registers
are shown in the table below. The values for these EEPROM access registers are the sets that can be stored within the EEPROM. The amount
of sets available for storing user offset settings depends on the type of board you use. The table below shows all the EEPROM sets, that are
available for your board.
If you want to make an offset adjustment on all the channels and store the data to the ADJ_USER0 set of the EEPROM you can do this the
way, the following example shows.
spcm_dwSetParam_i32 (hDrv, SPC_AMP0 , 1000); // Set up channel0 to the range of ± 1.0 V
spcm_dwSetParam_i32 (hDrv, SPC_AMP1 , 1000); // Set up channel1 to the range of ± 1.0 V
spcm_dwSetParam_i32 (hDrv, SPC_AMP2 , 1000); // Set up channel2 to the range of ± 1.0 V
spcm_dwSetParam_i32 (hDrv, SPC_AMP3 , 1000); // Set up channel3 to the range of ± 1.0 V
spcm_dwSetParam_i32 (hDrv, SPC_OFFS0, -100); // Set the input offset to get the signal symmetrically to 0.0 V
spcm_dwSetParam_i32 (hDrv, SPC_OFFS1, -50);
spcm_dwSetParam_i32 (hDrv, SPC_OFFS2, 50);
spcm_dwSetParam_i32 (hDrv, SPC_OFFS3, 100);
Register
Value
Direction
Description
SPC_50OHM0
30030
read/write
A „1“ sets the 50 ohm termination for channel0. A „0“ sets the termination to1 MOhm.
SPC_50OHM1
30130
read/write
A „1“ sets the 50 ohm termination for channel1. A „0“ sets the termination to1 MOhm.
SPC_50OHM2
30230
read/write
A „1“ sets the 50 ohm termination for channel2. A „0“ sets the termination to1 MOhm.
SPC_50OHM3
30330
read/write
A „1“ sets the 50 ohm termination for channel3. A „0“ sets the termination to1 MOhm.
Register
Value
Direction
Description
SPC_ADJ_AUTOADJ
50020
write
Performs the automatic offset compensation in the driver either for all input ranges or only the actual.
ADJ_ALL
0
Automatic offset adjustment for all input ranges.
Register
Value
Direction
Description
SPC_ADJ_LOAD
50000
write
Loads the specified set of settings from the EEPROM. The default settings are automatically loaded,
when the driver is started.
read
Reads out, what kind of settings have been loaded last.
SPC_ADJ_SAVE
50010
write
Stores the actual settings to the specified set in the EEPROM. T
read
Reads out, what kind of settings have been saved last.
ADJ_DEFAULT
0
Default settings can be loaded only. These settings cannot be saved by the user.
ADJ_USER0
1
User settings 0. This is a valid set for storing user offset settings to.
spcm_dwSetParam_i32 (hDrv, SPC_ADJ_AUTOADJ, ADJ_ALL ); // Activate offset adjustment on all channels
spcm_dwSetParam_i32 (hDrv, SPC_ADJ_SAVE, ADJ_USER0); // and store values to USER0 set in the EEPROM