Fast 12 bit transient recorder, a/d converter board for compactpci bus (102 pages)
Summary of Contents for Spectrum Brands MI.61xx
Page 1
MI.61xx fast 8 bit arbitrary waveform generator D/A converter board for PCI bus Hardware Manual Driver Manual English version November 9, 2012 SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC 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: http://www.spectrum-instrumentation.com...
Page 2
(c) SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC GMBH AHRENSFELDER WEG 13-17, 22927 GROSSHANSDORF, GERMANY SBench is a registered trademark of Spectrum Systementwicklung Microelectronic GmbH. Microsoft, Visual C++, Visual Basic, Windows, Windows 98, Windows NT, Window 2000 and Windows XP, Windows Vista, Windows 7 are trademarks/registered trademarks of Microsoft Corporation.
Introduction........................6 Preface ....................................6 General Information ................................6 Different models of the MI.61xx series ............................ 7 Additional options ................................8 Extra I/O (Option -XMF)..............................8 Extra I/O (Option -XIO)..............................8 Starhub ..................................9 The Spectrum type plate ..............................10 Hardware information.................................
Page 4
Programming the Board ....................34 Overview ..................................34 Register tables ................................... 34 Programming examples............................... 34 Error handling..................................34 Initialization..................................35 Starting the automatic initialization routine ........................35 PCI Register ................................. 35 Hardware version................................. 36 Date of production................................ 36 Serial number ................................36 Maximum possible sample rate ............................
Page 5
Option Multiple Replay ....................59 Output modes ..................................59 Standard Mode................................59 FIFO Mode .................................. 59 Trigger modes..................................59 Resulting start delays..............................60 Option Gated Replay ....................... 61 Output modes ..................................61 Standard Mode................................61 FIFO Mode .................................. 61 Trigger modes..................................61 General information and trigger delay ..........................
Preface Introduction Introduction Preface This manual provides detailed information on the hardware features of your Spectrum instrumentation board. This information includes tech- nical data, specifications, block diagram and a connector description. In addition, this guide takes you through the process of installing your board and also describes the installation of the delivered driver package for each operating system.
Introduction Different models of the MI.61xx series Different models of the MI.61xx series The following overwiew shows the different available models of the MI.61xx series. They differ in the number mounted generation modules and the number of available channels. You can also see the model dependant allocation of the output connectors. •...
Additional options Introduction Additional options Extra I/O (Option -XMF) With this simple-to-use enhancement it is possible to control a wide range of external instruments or other equipment. Therefore you have 24 digital I/O and the 4 analog outputs available. The extra I/O option is useful if an external amplifier should be con- trolled, any kind of signal source must be programmed, an antenna...
Introduction Additional options 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 Introduction 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. The size of the on-board installed memory in MSamples.
Introduction Hardware information Hardware information Block diagram Technical Data Resolution 8 Bit Dimension 312 mm x 107 mm Integral linearity (DAC) ± 1.5 LSB typ. Width (Standard) 1 full size slot Differential linearity (DAC) ± 1.0 LSB typ. Width (with star hub option) 2 full size slots Output resistance <...
Hardware Installation System Requirements Hardware Installation System Requirements All Spectrum MI.xxxx instrumentation boards are compliant to the PCI standard and require in general one free full length slot. Depending on the installed options additional free slots can be necessary. Warnings ESD Precautions The boards of the MI.xxxx series contain electronic components that can be damaged by electrostatic discharge (ESD).
Installing the board in the system Hardware Installation Installing a board with digital inputs/outputs 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.
Hardware Installation Installing the board in the system Installing multiple boards synchronized by starhub Hooking up the boards Before mounting several synchronized boards for a multi channel system into the PC you can hook up the boards with their synchronization cables first.
Installing the board in the system Hardware Installation Installing multiple synchronized boards Hooking up the boards Before mounting several synchronized boards for a multi channel system into the PC you can hook up the boards with the synchronization cable first. If there is enough space in your computer’s case (e.g. a big tower case) you can also mount the boards first and hook them up afterwards.
Software Driver Installation Interrupt Sharing Software Driver Installation Before using the board a driver must be installed that matches the operating system. The installation is done in different ways depending on the used operating system. The driver that is on CD supports all boards of the MI, MC and MX series. That means that you can use the same driver for all boards of theses families.
Windows XP 32/64 Bit Software Driver Installation 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. Do not let Windows automatically search for the best driver, be- cause sometimes the driver will not be found on the CD.
Software Driver Installation Windows XP 32/64 Bit On the property page Windows XP shows the date and the version of the installed driver. After clicking the driver details button the detailed version information of the driver is shown. In the case of a support question this information must be presented together with the board’s serial number to the support team to help finding a fast solution.
Windows Vista/7 32/64 Bit Software Driver Installation Windows Vista/7 32/64 Bit Installation When installing the card in a Windows Vista or Windows 7 system, it might be recognized automatically on the next start-up. The system tries at first to automatically search and install the drivers from the Microsoft homepage. This mechanism will fail at first for the „PCI Device“...
Software Driver Installation Windows Vista/7 32/64 Bit On the upcoming Windows security dialog select install. To pre- vent Windows Vista/7 to always ask this question for future up- dates, you can optionally select to always trust software from Spctrum. The hardware assistant then shows you the exact board type that has been found like the MI.3120 in the example.
Windows NT / Windows 2000 32 Bit Software Driver Installation Windows NT / Windows 2000 32 Bit Installation Under Windows NT and Windows 2000 the Spectrum driver must be installed man- ually. The driver is found on CD in the directory \Driv- er\win32\winnt.
Software Driver Installation Linux Linux Overview The Spectrum boards are delivered with drivers for linux. It is necessary to install them manually following the steps explained afterwards. The linux drivers can be found on CD in the directory /Driver/linux. As linux is an open source operating system there are several distributions in use world-wide that are compiled with different kernel settings.
Page 24
Linux Software Driver Installation Depending on the used linux distribution the insmod command generates a message telling the driver version and the board types and serial numbers that have been found. If your distribution does not show this message it is possible to view them with the dmesg command: linux:~ # dmesg ...
Software Software Overview Software This chapter gives you an overview about the structure of the drivers and the software, where to find and how to use the examples. It detailed shows how the drivers are included under different programming languages and where the differences are when calling the driver functions from different programming languages.
C/C++ Driver Interface Software C/C++ Driver Interface C/C++ is the main programming language for which the drivers have been build up. Therefore the interface to C/C++ is the best match. All the small examples of the manual showing different parts of the hardware programming are done with C. Header files The basic task before using the driver is to include the header files that are delivered on CD together with the board.
Software C/C++ Driver Interface Examples Examples can be found on CD in the path /Examples/linux. There is one subdirectory for each board family. You’ll find board specific ex- amples for that family there. The examples are bus type independent. As a result that means that the MI30xx directory contains examples for the MI.30xx, the MC.30xx and the MX.30xx families.
Page 28
C/C++ Driver Interface Software Using the Driver under Linux: hDrv = open ("/dev/spc0", O_RDWR); close (hDrv); Function SpcSetParam All hardware settings are based on software registers that can be set by the function SpcSetParam. This function sets a register to a defined value or executes a command.
Page 29
Software C/C++ Driver Interface Function SpcSetData (Windows) int16 SpcSetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data); Under Linux the additional parameter nBytesPerSample must be used for this function. For all boards with 8 bit resolution the parameter is „1“, for all boards with 12, 14 or 16 bit resolution this parameter has to be „2“.
Delphi (Pascal) Programming Interface Software Delphi (Pascal) Programming Interface 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. Delphi type definition: type int8...
Page 31
Software Delphi (Pascal) Programming Interface 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“...
Visual Basic Programming Interface Software 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.
Page 33
Software Visual Basic Programming Interface Function SpcGetParam The function SpcGetParam reads out software registers or status information. The board must first be initialized. The available software re- gisters for the driver are listed in the board specific part of the documentation below. The value „nr“...
Overview Programming the Board Programming the Board Overview The following chapters show you in detail how to program the different aspects of the board. For every topic there’s a small example. For the examples we focussed on Visual C++. However as shown in the last chapter the differences in programming the board under different programming languages are marginal.
Programming the Board Initialization This means as a result that it is not necessary to check each driver call for an error but to check for an error before the board is started to see whether all settings have been valid. By reading all the error information one can easily examine where the error occured.
Initialization Programming the Board 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.
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...
Powerdown and reset Programming the Board Example program for the board initialization The following example is only an exerpt to give you an idea on how easy it is to initialize a Spectrum board. // ----- Initialization of PCI Bus Boards ----------------------------------- if (SpcInitPCIBoards (&nCount, &nPCIBusVersion) != ERR_OK) return;...
Analog Outputs Channel Selection Analog Outputs Channel Selection One key setting that influences all other possible settings is the channel enable register. An unique feature of the Spectrum boards is the possibility to program the number of channels you want to use. All on-board memory can then be used by these activated channels. This description shows you the channel enable register for the complete board family.
Channel Selection Analog Outputs Setting up the outputs Output Amplifiers This arbitrary waveform generator board uses separate output am- plifiers for each channel. This gives you the possibility to seperately set up the channel outputs to best suit your application The output amplifiers can easily be set by the corresponding am- plitude registers.
Analog Outputs Channel Selection In order not to generate distorted signals it is nec- essary to keep the total output range as a combina- tion of the set amplitude and offset within a range of ±3000 mV. If this limit is exceeded a heavy distorted signal will be seen and the signals waveform will be cut off at the maximum range of +3000 mV or at the mini- mum range of -3000 mV.
General description Standard generation modes Standard generation modes General description The generated data is replayed from the on-board memory. These modes allows generating waveforms at very high sample rates without the need to transfer the data into the board’s on-board memory at high speed. These modes are running totally independent from the PC and don’t need any processing power after being started.
Page 43
Standard generation modes Programming Maximum memsize n.a. n.a. How to read this table: If you have installed the standard amount of 8 MSample on your 6111 board and you want to replay all four channels, you have a total maximum memory of 16 MSample * 1/4 = 4 MSample per channel for your data. The maximum settings for the post counter are limited by the hardware, because the post counter has a limited range for counting.
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.
Standard generation modes Programming To prevent the program from this deadlock, a second task must be used which can send the SPC_STOP signal to stop the board. Another possibility, that does not require the need of a second task is to define a timeout value. Register Value Direction...
Programming Standard generation modes 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. The next example shows, how to write the data before replaying two channels without multiplexing to both memory channels. for (i = 0;...
FIFO Mode Overview FIFO Mode Overview General Information The FIFO mode allows to record data continuously and trans- fer it online to the PC (acquisition boards) or allows to write data continuously from the PC to the board (generation boards). Therefore the on-board memory of the board is used as a continuous buffer.
FIFO Mode Programming Analog acquisition or generation boards Buffer length to be programmed in Bytes 8 bit resolution 12 bit resolution 14 bit resolution 16 bit resolution 1 Channel 1 x [Samples in Buffer] 1 x 2 x [Samples in Buffer] 1 x 2 x [Samples in Buffer] 1 x 2 x [Samples in Buffer] 2 Channels...
Example FIFO generation mode 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.
FIFO Mode Example FIFO generation mode Before starting the FIFO output all software buffers must be filled once with data. The driver immediately transfers data to the hardware after receiving the start command. Data organization When using FIFO mode data in memory is organized in some cases a little bit different then in standard mode. This is a result of the internal hardware structure of the board.
Overview Clock generation Clock generation 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.
Clock generation Internally generated sample rate Maximum internal sample rate in MS/s normal (non FIFO) mode Remapped channels n.a. n.a. Maximum internal sample rate in MS/s in FIFO mode Remapped channels n.a. n.a. 62.5 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.
External clocking Clock generation External clocking Direct external clock An external clock can be fed in on the external clock connector of the board. This can be any clock, that matches the specification of the card. The external clock signal can be used to synchronize the card on a system clock or to feed in an exact matching sample rate. Register Value Direction...
Clock generation External clocking Example: SpcSetParam (hDrv, SPC_CHENABLE, CHANNEL0 | CHANNEL1 | CHANNEL2 | CHANNEL3); // activate all 4 channels SpcSetParam (hDrv, SPC_EXTERNALCLOCK, // activate external clock SpcSetParam (hDrv, SPC_EXTERNRANGE, EXRANGE_BURST_M); // set external range to Burst M External clock with divider The extra clock divider can be used to divide an external fed in clock by a fixed value.
General Description Trigger modes and appendant registers Trigger modes and appendant registers 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.
Trigger modes and appendant registers External TTL trigger As the trigger connector is used as an input, you can decide whether the input is 50 Ohm terminated or not. If you enable the termination, please make sure, that your trigger source is capable to deliver the desired current. If termination is disabled, the input is at high impedance. Register Value Direction...
Page 58
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.
Option Multiple Replay Output modes Option Multiple Replay The option Multiple Replay allows the generation of data blocks with multiple trigger events without restarting the hardware. The on-board memory will be divided into several segments of the same size. Each segment will be replayed when a trigger event occures. Output modes Standard Mode With every detected trigger event one data block is replayed.
Option Gated Replay Output modes Option Gated Replay The option Gated Replay allows the data generation controlled by an external gate signal. Data will only be output, if the programmed gate condition is true. Output modes Standard Mode Data will be replayed as long as the gate signal fulfills the gate condition that has had to be programmed before.
Trigger modes Option 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).
Option Gated Replay Example program Number of samples on gate signal As described above there’s a delay at the start of the gate interval due to the internal memory structure. However this delay can be partly compensated by internal pipelines resulting in a data delay that even can be negative showing the trigger event (acquisition mode only). This data delay is listed in an extra table.
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).
Option Extra I/O Analog Outputs Analog Outputs In addition to the digital I/Os there are four analog outputs available. These outputs are directly programmed with the voltage values in mV. As the analog outputs are driven by a 12 bit DAC, the output voltage can be set in a stepsize of 5 mV. The table below shows the registers, you must write the desired levels too.
The different synchronization options Synchronization (Option) Synchronization (Option) This option allows the connection of multiple boards to generate a multi-channel system. It is possible to synchronize multiple Spectrum boards of the same type as well as different board types. Therefore the synchronized boards must be linked concerning the board’s system clock and the trigger signals.
Synchronization (Option) The setup order for the different synchronization options When the boards are synchronized by the option starhub there will be no delay between the connected boards. This is achieved as all boards, including the one the starhub module is mounted on, are connected to the starhub with cables of the same length.
Page 68
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 69
Synchronization (Option) The setup order for the different synchronization options Even if a board is not using the synchronization trigger, it before must be set as a triggerslave with the SPC_SYNCTRIGGERSLAVE command. After you have excluded one or more of the installed boards from the synchronization trigger it is possible to change the triggermodes of these boards.
Page 70
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...
Synchronization (Option) The setup order for the different synchronization options Setup synchronization for use with FIFO mode and equally clocked boards Most of the steps are similar to the setup routine for standard synchronization mentioned before. In this passage only the differences between the two modes are shown.
Page 72
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.
Synchronization (Option) The setup order for the different synchronization options Additions for synchronizing different boards 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.
Synchronization (Option) The setup order for the different synchronization options The following example calculation is explaining that case by using to acquisition boards. One of the boards is running with only a hundreth of the other sample rate. Example with equal boards but asynchronous speeds Board type 3121 3121...
Error Codes Appendix Appendix Error Codes The following error codes could occur when a driver function has been called. Please check carefully the allowed setup for the register and change the settings to run the program. error name value (hex) value (dec.) error description ERR_OK...
Pin assignment of the multipin connector 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 internal multipin connector IDC footprints The 20 pole IDC connectors have the following footprints. For easy usage in your PCB the cable footprint as well as the PCB top footprint are shown here. Please note that the PCB footprint is given as top view. The following table shows the relation between the card connector pin and the IDC pin:t IDC footprint pin Card connector pin...
Need help?
Do you have a question about the MI.61xx and is the answer not in the manual?
Questions and answers