Spectrum Brands MI.61XX Installed features and options, Used interrupt line, Used type of driver

Page 39

Programming the Board

Initialization

 

 

Installed features and options

The SPC_PCIFEATURES register informs you about the options, that are installed on the board. If you want to know about one option being installed or not, you need to read out the 32 bit value and mask the interesting bit.

Register

Value

Direction

Description

SPC_PCIFEATURES

2120

r

PCI feature register. Holds the installed features and options as a bitfield, so the return value must be

 

 

 

 

masked with one of the masks below to get information about one certain feature.

 

PCIBIT_MULTI

1

Is set if the Option Multiple Recording / Multiple Replay is installed.

 

PCIBIT_DIGITAL

2

Is set if the Option Digital Inputs / Digital Outputs is installed.

 

 

 

 

 

PCIBIT_GATE

32

Is set if the Option Gated Sampling / Gated Replay is installed.

 

 

 

 

 

PCIBIT_SYNC

512

Is set if the Option Synchronization is installed for that certain board, regardless what kind of synchronization you

 

 

 

use. Boards without this option cannot be synchronized with other boards.

 

PCIBIT_TIMESTAMP

1024

Is set if the Option Timestamp is installed.

 

PCIBIT_STARHUB

2048

Is set on the board, that carrys the starhub piggy-back module. This flag is set in addition to the PCIBIT_SYNC flag

 

 

 

mentioned above. If on no synchronized board the starhub option is installed, the boards are synchronized with the

 

 

 

cascading option.

 

PCIBIT_XIO

8192

Is set if the Option Extra I/O is installed.

The following example demonstrates how to read out the information about one feature.

SpcGetParam (hDrv,

SPC_PCIFEATURES,

&lFeatures);

if (lFeatures & PCIBIT_DIGITAL)

 

printf("Option

digital inputs is installed on your board");

Used interrupt line

This register holds the information of the actual used interrupt line for the board. This information is sometimes more easy in geting the interrupt line of one specific board then using the hardware setups of your operating system.

Register

Value

Direction

Description

SPC_PCIINTERRUPT

2300

r

The used interrupt line of the board.

Used type of driver

This register holds the information about the driver that is actually used to access the board. Although most users will use the boards within a Windows system and most Windows users will use the WDM driver, it can be sometimes necessary of knowing the type of driver.

Register

Value

Direction

Description

SPC_GETDRVTYPE

1220

r

Gives information about what type of driver is actually used

 

DRVTYP_DOS

0

DOS driver is used

 

 

 

 

 

DRVTYP_LINUX

1

Linux driver is used

 

DRVTYP_VXD

2

Windows VXD driver is used (only Windows 95)

 

DRVTYP_NTLEGACY

3

Windows NT Legacy driver is used (only Windows NT)

 

 

 

 

 

DRVTYP_WDM

4

Windows WDM driver is used (only Windows 98/ME/2000/XP). This is the most common Windows driver.

Driver version

This register informs Windows users about the actual used driver DLL. This information can also be obtained from the device manager. Please refer to the „Driver Installation“ chapter. Linux users will get the revision of their kernel driver instead, because linux does not use any DLL.

Register

Value

Direction

Description

SPC_GETDRVVERSION

1200

r

Gives information about the driver DLL version

Kernel Driver version

This register informs OS independent about the actual used kernel driver. Windows users can also get this information from the device ma- nager. Plese refer to the „Driver Installation“ chapter. Linux users can get the driver version by simply accessing the following register for the kernel driver.

Register

Value

Direction

Description

SPC_GETKERNELVERSION

1210

r

Gives information about the kernel driver version.

(c) Spectrum GmbH

39

Image 39
Contents English version October 5 MI.61xxPage Software Hardware InstallationSoftware Driver Installation IntroductionStandard generation modes Fifo ModeProgramming the Board Analog OutputsAppendix Option Gated ReplayOption Extra I/O Synchronization OptionPreface IntroductionPreface General InformationDifferent models of the MI.61xx series MI.6110 MI.6111Introduction Additional options Extra I/O Option -XMFExtra I/O Option -XIO Introduction Additional options StarhubSpectrum type plate Hardware information Block diagram Technical DataFilter Dynamic ParametersOrder information Hardware informationIntroductionHardware Installation Installing the board in the systemSystem Requirements Installing a board with extra I/O Option -XMF Installing a board with digital inputs/outputsOnly use the included flat ribbon cables Installing multiple boards synchronized by starhubMounting the wired boards Hooking up the boardsInstalling multiple synchronized boards Software Driver Installation Software Driver InstallationInterrupt Sharing Installation WindowsVersion control Driver Update Windows Software Driver Installation Windows Windows XP Windows XP Adding boards to the Windows NT driver Windows NTOverview LinuxAutomatic load of the driver Installing the deviceNow it is possible to access the board using this device Driver infoSoftware SoftwareSoftware Overview First Test with SBenchLinux Gnu C ++ Driver InterfaceHeader files Microsoft Visual C++Include Drivers Other Windows C/C++ compilersNational Instruments LabWindows/CVI Driver functionsFunction SpcGetData Function SpcSetParamFunction SpcSetParam Function SpcSetData WindowsSpectrum GmbH Examples Delphi Pascal Programming InterfaceType definition Include DriverDelphi Pascal Programming Interface Visual Basic Programming Interface Visual Basic ExamplesVBA for Excel Examples Visual Basic Programming Interface Register tables Error handlingProgramming the Board OverviewPCI Register Example for error checkingInitialization Starting the automatic initialization routineSerial number Installed memoryHardware version Date of productionDriver version Installed features and optionsUsed interrupt line Used type of driverSpcpciserialno Powerdown and resetExample program for the board initialization SpcpcimemsizeDisabling the outputs Analog OutputsChannel Selection Important note on channels selectionRegister Value Direction Description Amplitude range Setting up the outputsOutput Amplifiers Output offsetFilter Specifications Maximum Output RangeOutput Filters Standard generation modes General descriptionProgramming Minimum and stepsize of memsize and posttrigger in samples Standard generation modes ProgrammingMaximum memsize Maximum posttrigger in MSamplesProgrammingStandard generation modes Starting without interrupt classic modeStarting with interrupt driven mode Command registerValue ’len’ as a 32 bit integer value Data organizationWriting data with SpcSetData Value ’start’ as a 32 bit integer valueStandard mode Bit Standard ModeSample format Speed Limitations Fifo ModeGeneral Information Background Fifo Write60040 Read out the number of available Fifo buffers Programming Fifo ModeSoftware Buffers Theoretical maximum sample rate PCI Bus ThroughputDigital I/O 701x or 702x or pattern generator boards Fifo Mode ProgrammingBuffer processing Analog acquisition or generation boardsSpcfifowait Example Fifo generation mode== Maxbuf SpcfifostartProgramming Clock generation Internally generated sample rateStandard internal sample rate Using plain quartz with no PLL External reference clockExternal clocking Direct external clock Minimum external sample rateMaximum external samplerate in MS/s External clock with divider ExampleCHANNEL0 CHANNEL1 CHANNEL2 CHANNEL3 External TTL trigger Example for setting up the software triggerTrigger modes and appendant registers Software triggerPositive TTL trigger Example on how to set up the board for positive TTL triggerEdge triggers Trigger modes and appendant registersPositive and negative TTL trigger Trigger modes Standard ModeOption Multiple Replay Output modesTrigger modes Option Multiple Replay Resulting start delaysValue Direction Description General information and trigger delayOption Gated Replay Option Gated ReplaySpctriggermode Tmttlpos Example programAllowed trigger modes External TTL edge triggerTransfer Data Option Extra I/ODigital I/Os Channel directionAnalog Outputs Programming exampleAnalog Outputs Option Extra I/O Synchronization with option starhub Synchronization OptionDifferent synchronization options Synchronization with option cascadingWrite Data to on-board memory output boards only Setup order for the different synchronization optionsSet up the board parameters Example of board setup for three boardsDefine the remaining boards as trigger slaves Define the boards for trigger masterExample of board #2 set as trigger master 3a Define synchronization or triggerArm the boards for synchronization Define the board for clock masterExample board number 0 is clock master Define the remaining boards as clock slavesExample for data reading Start all of the trigger master boardsWait for the end of the measurement Read data from the on-board memory acquisition boards onlySpcsyncslavefifo Allocate the Fifo software buffers2a Write first data for output boards SpcsyncmasterfifoAs trigger slaves 20xx 30xx 31xx 40xx 45xx 60xx 61xx 70xx 72xx Additions for synchronizing different boardsGeneral information Calculating the clock dividersBoard type 3025 3131 Setting up the clock dividerBoard type 3122 3120 40 MS/sAdditions for equal boards with different sample rates Resulting delays using different boards or speedsDelay in standard non Fifo modes Delay in Fifo modeAppendix Error CodesError name Value hex Value dec Error description AppendixPin assignment of the multipin connector Extra I/O with external connectorOption -XMFPin assignment of the multipin cable D15 D13 D11 Pin assignment of the internal multipin connectorExtra I/O with internal connector Option -XIO D14 D12 D10