Analog Inputs
Setting up the inputs
(c) Spectrum GmbH
67
Enhanced Status Register
The enhanced status register shows detected channel overrange events during the last acquisition. It can only be read out after the acquisition
has stopped. If the input signal on the channel exceeds the programmed input range even for just one time the overrange register is set in
hardware.
Automatic on-board calibration of the offset and gain 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 and gain adjustment on all the channels and store the data to the ADJ_DEFAULT set of the EEPROM you can
do this the way, the following example shows.
Register
Value
Direction
Description
SPC_FILTER0
30080
read/write
A „1“ selects the bandwidth limit for channel 0. A „0“ set the channel to full bandwidth (default is full)
SPC_FILTER1
30180
read/write
A „1“ selects the bandwidth limit for channel 1. A „0“ set the channel to full bandwidth (default is full
Register
Value
Direction
Description
SPC_ENHANCEDSTATUS
20900
read
Reads out the enhanced status information of the card.
SPC_ENHSTAT_OVERRANGE0
00000001h
Bit is set if an overrange event has occurred on channel 0.
SPC_ENHSTAT_OVERRANGE1
00000002h
Bit is set if an overrange event has occurred on channel 1.
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.
read
Reads out, what kind of settings have been saved last.
ADJ_DEFAULT
0
Default settings, no user settings available
spcm_dwSetParam_i32 (hDrv, SPC_ADJ_AUTOADJ, ADJ_ALL ); // Activate offset/gain adjustment on all channels
spcm_dwSetParam_i32 (hDrv, SPC_ADJ_SAVE , ADJ_DEFAULT); // and store values to DEFAULT set in the EEPROM