Page 1
PCI bus Hardware Manual Driver Manual English version May 24, 2018 SPECTRUM INSTRUMENTATION GMBH · AHRENSFELDER WEG 13-17 · 22927 GROSSHANSDORF · GERMANY PHONE: +49 (0)4102-6956-0 · FAX: +49 (0)4102-6956-66 · E-MAIL: info@spec.de · INTERNET: www.spectrum-instrumentation.com...
Page 2
(c) SPECTRUM INSTRUMENTATION GMBH AHRENSFELDER WEG 13-17, 22927 GROSSHANSDORF, GERMANY SBench, digitizerNETBOX and generatorNETBOX are registered trademarks of Spectrum Instrumentation GmbH. Microsoft, Visual C++, Visual Basic, Windows, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 and Windows Server are trademarks/registered trademarks of Microsoft Corporation.
Different models of the MI.72xx series ............................ 7 Additional options ................................9 Extra I/O (Option -XMF)..............................9 Extra I/O (Option -XIO)..............................9 Starhub ..................................10 The Spectrum type plate ..............................11 Hardware information................................. 12 Block diagram................................12 Order information................................. 13 Hardware Installation ..................... 14 System Requirements ................................
Page 4
Programming the Board ....................35 Overview ..................................35 Register tables ................................... 35 Programming examples............................... 35 Error handling..................................35 Initialization..................................36 Starting the automatic initialization routine ........................36 PCI Register ................................. 36 Hardware version................................. 37 Date of production................................ 37 Serial number ................................37 Maximum possible sample rate ............................
Page 5
Multiple Replay ....................... 63 Output modes ..................................63 Standard Mode................................63 FIFO Mode .................................. 63 Trigger modes..................................63 Gated Replay ........................65 Output modes ..................................65 Standard Mode................................65 FIFO Mode .................................. 65 Trigger modes..................................65 General information and trigger delay ..........................65 Alignement samples per channel ............................
For any new information on the board as well as new available options or memory upgrades please contact our website www.spectrum-instrumentation.com. You will also find the current driver package with the latest bug fixes and new features on our site.
The following overwiew shows the different available models of the MI.72xx series. They differ in the number of mounted generation modules and the number of available channels. You can also see the model dependant allocation of the output connectors. • MI.7210 • MI.7211 • MI.7220 (c) Spectrum GmbH...
Page 8
Different models of the MI.72xx series Introduction • MI.7221 MI.72xx Manual...
It is not possible to use this option together with the star hub or timestamp option, because there is just space for one piggyback module on the on-board expansion slot. (c) Spectrum GmbH...
Additional options Introduction Starhub The star hub module allows the syn- chronisation of up to 16 MI boards. It is possible to synchronise boards of the same type with each other as well as different types. The module acts as a star hub for clock and trigger signals.
The Spectrum type plate The Spectrum type plate, which consists of the following components, can be found on all of our boards. The board type, consisting of the two letters describing the bus (in this case MI for the PCI bus) and the model number.
Hardware information Introduction Hardware information Block diagram Technical Data Internal samplerate 1 kS/s up to maximum (depending on model) Dimension 312 mm x 107 mm External samplerate DC up to maximum (depending on model) Width (MI.721x) 1 full size slot Clock input impedance 110 Ohm / 50 kOhm || 15 pF Width (MI.722x)
LabVIEW driver for MI.72xx series Cab-d40-idc-100 Additional 40 pole flat ribbon cable with IDC socket connector, ca. 1 MATLAB MATLAB driver for all MI.xxxx, MC.xxxx and MX.xxxx series. Cab-d40-d40-100 Additional 40 pole flat ribbon cable withFx2 connector, ca. 1 m (c) Spectrum GmbH...
Before installing the board you first need to unscrew and remove the dedicated blind-bracket usually mounted to cover unused slots of your PC. Please keep the screw in reach to fasten your Spectrum board afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by it’s retainer.
Before installing the board you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum board and the extra bracket afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by it’s retainer.
Before installing the boards you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum boards afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by it’s retainer.
Before installing the boards you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum boards afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by it’s retainer.
Most available drivers and also the Spectrum driver for your board can manage interrupt sharing. But there are also some drivers on the market that can only use one interrupt exclusively. If this equipment shares an interrupt with the Spectrum board, the system will hang up if the second driver is loaded (the time is depending on the operating system).
Windows XP 32/64 Bit Windows XP 32/64 Bit Installation When installing the board in a Windows XP system the Spectrum board will be rec- ognized automatically on the next start-up. The system offers the direct installation of a driver for the board.
Driver - Update If a new driver version should be installed no Spectrum board is allowed to be in use by any software. So please stop and exit all software that could access the boards.
Microsoft homepage. This mechanism will fail at first for the „PCI Device“ device, because the Spectrum drivers are not available via Microsoft, so simply close the dialog. This message can be safely ignored.
The driver update under Windows Vista/7 is exact the same procedure as the initial instal- lation. Please follow the steps above, starting from the device manager, select the Spectrum card to be updated, right-click and select „Update Driver Software...“ and follow the steps above.
• Restart the system Driver - Update If a new driver version should be installed no Spectrum board is allowed to be in use by any software. So please stop and exit all software that could access the boards. When updating a system please simply execute the setup file of the new driver version. Afterwards the system has to be rebooted. The driver configuration is not changed.
First time load of the driver The linux driver is shipped as the loadable module spc.o. The driver includes all Spectrum PCI, PXI and CompactPCI boards. The boards are recognized automatically after driver loading.Load the driver with the insmod command: linux:~ # insmod spc.o...
First time load of the driver The linux driver is shipped as the loadable module spc.o. The driver includes all Spectrum PCI, PXI and CompactPCI boards. The boards are recognized automatically after driver loading.Load the driver with the insmod command: linux:~ # insmod spc.o...
Page 26
Now it is possible to access the board using this device. Driver info Information about the installed boards could be found in the /proc/spectrum file. All PCI, PXI and CompactPCI boards show the basic infor- mation found in the EEProm there. This is an example output generated by a MI.3020:...
Software Overview The Spectrum drivers offer you a common and fast API for using all of the board hardware features. This API is nearly the same on all operating systems. Based on this API one can write your own programs using any programming language that can access the driver API. This manual detailed describes the driver API allowing you to write your own programs.
The driver files can be easily included in Microsoft C++ by simply using the library file that is delivered together with the drivers. The library file can be found on the CD in the path /Examples/vc/c_header. Please include the library file Spectrum.lib in your Visual C++ project. All functions described below are now available in your program.
Include Drivers To use the Spectrum driver under LabWindows/CVI it is necessary to first load the functions from the driver dll. This is more or less similar to the above shown process with the only difference that LabWindows/CVI uses it’s own library handling functions instead of the windows standard functions.
Page 30
C/C++ Driver Interface Software Function SpcSetParam int16 SpcSetParam (int16 nr, int32 reg, int32 value); Under Linux the value „nr“ must contain the handle that was retrieved by the open function for that specific board. The values is then not of the type „int16“ but of the type „handle“. Function SpcGetParam The function SpcGetParam reads out software registers or status information.
Type definition All Spectrum driver functions are using pre-defined variable types to cover different operating systems and to use the same driver interface for all programming languages. Under Delphi it is necessary to define these types once. This is also shown in the examples delivered on CD.
Visual Basic Programming Interface The Spectrum boards can be used together with Microsoft Visual Basic as well as with Microsoft Visual Basic for Applications. This allows per example the direct access of the hardware from within Microsoft Excel. The interface between the programming language and the driver is the same for both.
It is necessary to select the function with the matching data width from the above mentioned data write func- tions. Use the SpcSetData8 function for boards with 8 bit resolution and use the SpcSetData16 function for boards with 12, 14 and 16 bit resolution. (c) Spectrum GmbH...
Page 34
Visual Basic Programming Interface Software This function is only available on generator or i/o boards. The function is not available on acquisition boards. Function SpcGetData Reads data from the board from a specific memory channel. The board must first be initialized. The value „nr“ contains the index of the board that you want to access, the „ch“...
// Windows users must set hDrv to the according board number before. // Assuming that there is only one Spectrum board installed you’ll // have to set hDrv like this: hDrv = 0;...
0 (ERR_OK). In any other cases something has gone wrong. Please see appendix for explanations of the different error codes. If the process of initializing the boards was successful, the function returns the total number of Spectrum boards that have been found in your system.
Hardware version Since all of the MI, MC and MX boards from Spectrum are modular boards, they consist of one base board and one or two (only PCI and CompactPCI) piggy-back modules. This register SPC_PCIVERSION gives information about the revision of either the base board and the mod- ules.
Initialization Programming the Board 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...
Powerdown and reset Every Spectrum board can be set to powerdown mode by software. In this mode the board is therefore consuming less power than in normal operation mode. The amount of saved power is board dependant. Please refer to the technical data section for details. The board can be set to normal mode again either by performing a reset as mentioned below or by starting the board as described in the according chapters later in this manual.
Setting up the bitmask An unique feature of the Spectrum pattern generator boards is the possibility to disable every single bit of the output. If an output bit is deac- tivated, it will be set to high impedance (tristate). The outputs then can be pushed within the limits of the programmed output levels.
–2000 to +9900 SPC_HIGHLEVEL4 42104 Defines the LOW level for nibble 0 (Output bit 3..0) on module 1. –2000 to +9900 SPC_HIGHLEVEL5 42105 Defines the LOW level for nibble 1 (Output bit 7..4) on module 1. –2000 to +9900 (c) Spectrum GmbH...
Setting up the outputs Digital Outputs Register Value Direction Description Level in mV SPC_HIGHLEVEL6 42106 Defines the LOW level for nibble 2 (Output bit 11..8) on module 1. –2000 to +9900 SPC_HIGHLEVEL7 42107 Defines the LOW level for nibble 3 (Output bit 15..12) on module 1. –2000 to +9900 The following example shows, how to set up the board to TTL compatible output levels.
Usually the outputs of a digital pattern generator board are set either to ground or to high impedance state after replay. This is in most cases adequate as many pattern generators generate signals with a relation to the system ground. In the case of the Spectrum 72xx series such a...
Reading the output status register Digital Outputs behavior would not be sufficiently as you can generate signals with no relation to ground like for example ECL compatible signals. These devices do not allow to be connected to a voltage other than the family specific negative levels. To deal with the unique output features the 72xx series you can programm the behavior of the outputs after a replay.
The status register will also indicate an error, if you use a 7220 or 7221 board and the board is not conected to the power supply of your computer. If all outputs are permanently disabled, please check the power con- nection first. (c) Spectrum GmbH...
Singleshot mode The singleshot mode is the most simple output mode for the Spectrum boards. It simply replays the programmed data once after detecting the trigger event. The amount of memory to be replayed can be programmed by software. Any trigger source can be used to start the output.
Page 47
Minimum and stepsize of memsize and posttrigger in samples Activated channels and samplewidth Ch0, 8 bit Ch0, 16 bit Ch1, 8 bit Ch1, 16 bit n.a. n.a. n.a. n.a. (c) Spectrum GmbH...
Programming Standard generation modes Starting without interrupt (classic mode) Command register Register Value Direction Description SPC_COMMAND read/write Command register of the board. SPC_START Starts the board with the current register settings. SPC_STOP Stops the board manually. In this mode the board is started by writing the SPC_START value to the command register. All settings like for example the size of memory and postcounter, the number of activated channels and the trigger settings must have been programmed before.
An example on how to get a second task that can do some monitoring on the running task and eventually send the SPC_STOP command can be found on the Spectrum driver CD that has been shipped with your board. The latest examples can also be down loaded via our website at www.spectrum-instrumentation.com.
Programming Standard generation modes writes data of both channels to memory channel 0 starting at sample position 4k and a length of 2k. The Data array must of course hold data of both channels (in that case 2 * 2k = 4k of data) multiplexed as shown above. Standard mode Writing data to the memory is really easy, if a replay mode is used, that stores non multiplexed data in the dedicated memory channels.
100-110 MBytes per second. The maximum FIFO speed one can achieve heavily depends on the PC system and the operating system and varies from system to system. The maximum sample rate one can run in continuous FIFO mode depends on the number of activated channels: (c) Spectrum GmbH...
2 x [Samples in Buffer] We at Spectrum achieved best results when programming the buffer length to a number of samples that can hold approximately 100 ms of data. However if going to the limit of the PCI bus with the FIFO mode or when having buffer overruns it can be useful to have larger FIFO buffers to buffer more data in it.
Programming FIFO Mode If one knows before starting FIFO mode how long this should run it is possible to program the number of buffers that the driver should process. After transferring this number of buffer the driver will automatically stop. If FIFO mode should run endless a zero must be programmed to this register.
N sample, bit 1 N sample, bit 1 Module 0 N sample, bit 1 N sample, bit 1 N sample, bit 0 (LSB) N sample, bit 0 (LSB) Module 0 N sample, bit 0 (LSB) N sample, bit 0 (LSB) (c) Spectrum GmbH...
Overview The Spectrum boards offer a wide variety of different clock modes to match all the customers needs. All the clock modes are described in detail with programming examples below. This chapter simply gives you an overview which clock mode to select: Standard internal sample rate PLL with internal 40 MHz reference.
Using plain quartz without PLL In some cases it is useful for the application not to have the on-board PLL activated. Although the PLL used on the Spectrum boards is a low- jitter version it still produces more clock jitter than a plain quartz oscillator. For these cases the Spectrum boards have the opportunity to switch off the PLL by software and use a simple clock divider.
Page 58
External clocking Clock generation Termination of the clock input If the external connector is used as an input, either for feeding in an external reference clock or for external clocking you can enable a 110 Ohm termination on the board. If the termination is disabled, the impedance is several Kiloohm. Please make sure that your source is capable of driving that current and that it still fulfills the clock input specification as given in the technical data section.
The extra clock divider can be used to divide an external fed in clock by a fixed value. The external clock must be > 1 MS/s. This divided clock is used as a sample clock for the board. Register Value Direction Description SPC_CLOCKDIV 20040 read/write Extra clock divider for external samplerate. Allowed values are listed below Available divider values 1000 2000 (c) Spectrum GmbH...
General Description Concerning the trigger modes of the Spectrum MI, MC and MX D/A boards, you can choose between three external TTL trigger modes and one internal software trigger. This chapter is about to explain the different trigger modes and setting up the board’s registers for the desired mode.
External TTL trigger If you want to synchronize external equipment with your Spectrum board, you can additionally enable the external trigger output. As men- tioned before there will be no output signal, if the internal software trigger mode is used.
Page 62
External TTL trigger Trigger modes and appendant registers Positive and negative TTL trigger This mode is for detecting the rising and falling edges of an ex- ternal TTL signal. The board will trigger on the first rising or falling edge that is detected after starting the board. The next trigger- event will then be detected, if the actual recording/replay has fin- ished and the board is armed and waiting for a trigger again.
The delay is fixed for a certain board setup. All possible de- lays in samples between the trigger event and the first re- played sample are listed in the table below. The patterntrigger modes of digital I/O boards cannot be used with multiple replay. (c) Spectrum GmbH...
Page 64
Trigger modes Multiple Replay Resulting start delays Sample rate Clock source Output Mode Activated channels external TTL trigger ext. TTL trigger with activated synchronization Ch 0, Ch 0, Ch 1, Ch 1, 8 bit 16 bit 8 bit 16 bit <...
It is fix for a certain board setup. All possible start delays in samples between the trigger event and the first replayed sample are listed in the table below. (c) Spectrum GmbH...
Trigger modes Gated Replay Due to the structure of the on-board memory there is an- other delay at the end of the gate interval. Internally a gate-end signal can only be recognized at an eight samples alignment. So depending on what time your external gate signal will leave the programmed gate condition it might hap- pen that at maximum seven more samples are replayed, before the board pauses (see figure).
4096); // Set the total memsize of generation to 4096 samples SpcSetParam (hDrv, SPC_TRIGGERMODE, TM_TTLPOS); // Sets the gate condition to external TTL mode, so that // data is replayed, if the signal is at HIGH level (c) Spectrum GmbH...
Digital I/Os Option Extra I/O Option Extra I/O Digital I/Os With this simple-to-use enhancement it is possible to control a wide range of external instruments or other equipment. Therefore you have several digital I/Os and the 4 analog outputs available. All extra I/O lines are completely independent from the board’s function, data di- rection or sample rate and directly controlled by software (asynchronous I/Os).
With the option starhub up to 16 Spectrum boards can be synchronized. All boards are connected with a seperate synchronization cable from their sync-connectors to the starhub module, which is a piggy-back module on one Spectrum board (for details please refer to the chapter about installing the hardware).
Please refer to the related chapter for the standard mode in this manual. If none of your synchronized boards is used for generation purposes you can ignore this step. (c) Spectrum GmbH...
Page 72
The setup order for the different synchronization options Synchronization (Option) Example for data writing SpcSetData (hDrv[0], 0, 0, 1024, pData[0]); SpcSetData (hDrv[1], 0, 0, 1024, pData[1]); SpcSetData (hDrv[2], 0, 0, 1024, pData[2]); (4) Define the board(s) for trigger master At least one board must be set as the trigger master to get synchronization running. Every one of the synchronized boards can be programmed for beeing the trigger master device.
Page 73
This is necessary because the function does not return until the board has stopped again. If not using different threads this will result in a program deadlock. Example of starting trigger slave boards. Board number 2 is trigger master. SpcSetParam (hDrv[0], SPC_COMMAND, SPC_START); SpcSetParam (hDrv[1], SPC_COMMAND, SPC_START); (c) Spectrum GmbH...
Page 74
The setup order for the different synchronization options Synchronization (Option) (10) Start all of the trigger master boards After having armed the synchronized boards, you must start all of the boards, that are defined as trigger masters. Register Value Direction Description SPC_COMMAND Command register of the board...
Settings the remaining boards to clock slaves. Board number 0 is clock master in the example SpcSetParam (hDrv[1], SPC_COMMAND, SPC_SYNCSLAVEFIFO); // Setting all the other boards to SpcSetParam (hDrv[2], SPC_COMMAND, SPC_SYNCSLAVEFIFO); // clock slave is a must ! (c) Spectrum GmbH...
Page 76
The setup order for the different synchronization options Synchronization (Option) (9) Start all of the trigger slave boards After having armed the synchronized boards, you must start all of the boards, that are defined as trigger slaves first. This is done with the FIFOSTART command.
General information Spectrum boards with different speed grades, different number of channels or even just different clock settings for the same types of boards can be synchronized as well. To get the boards working together synchronously some extra setups have to be done, which are described in the following passages.
The setup order for the different synchronization options Synchronization (Option) Setting up the clock divider The clock divider can easily be set by the following register. Please keep in mind that the divider must be set for every synchronized board to have synchronization working correctly.
Start delay in samples for FIFO synchronization only. The resulting delay between the clock master board and the single clock ResultingDelay ClockMasterDelay ClockSlaveDelay – slave boards can be easily calculated with the formular mentioned on the right. (c) Spectrum GmbH...
The PCI bus has the wrong version. SPECTRUM PCI boards require PCI revision 2.1 or higher. ERR_PCINOBOARDS 202h No SPECTRUM PCI boards found. If you have a PCI board in your system please check whether it is cor- rectly plug into the slot connector and whether you have the latest driver version. ERR_PCICHECKSUM 203h The checksum of the board information has failed.
Pin assignment of the multipin connector The 40 lead multipin connector is the main connector for all of Spectrum’s digital boards and is addi- tionally used for different options, like “Extra I/O“ or the additional digital inputs (on analog acquisition boards only) or additional digital outputs (on analog generation boards only).
Pin assignment of the multipin cable Pin assignment of the multipin cable The 40 lead multipin cable is used for the additional digital inputs (on analog acquisition boards only) or additional digital outputs (on analog generation boards only) as well as for the digital I/O or pat- tern generator boards.
Pin10 Pin12 Pin14 Pin16 Pin18 Pin20 Pin22 Pin24 Pin26 Pin1 Pin3 Pin5 Pin7 Pin9 Pin11 Pin13 Pin15 Pin17 Pin19 Pin21 Pin23 Pin25 A3…A0 are the pins for the analog outputs, while D15…D0 are the 16 digital I/Os. (c) Spectrum GmbH...
Need help?
Do you have a question about the MI.72 Series and is the answer not in the manual?
Questions and answers