HP manual 14 9112ADDMAStart

Page 59

5.14 _9112_AD_DMA_Start

uDescription

The function will perform A/D conversion N times with DMA data transfer. It takes place in the background which will not stop until the N-th

conversion has completed or your program execute _9112_AD_DMA_Stop() function to stop the process.

After executing this function, it is necessary to check the status of the operation by using the function _9112_AD_DMA_Status(). The function is performed on single A/D channel when the A/D channel auto-scan is set as FALSE. If the A/D channel auto-scan is TRUE, the conversion will be multiple channels by sequence.

The PCI-9112 Bus mas tering DMA is different from tradition PC style DMA. Its description is as following:

Bus Mastering DMA mode of PCI-9112:

PCI bus mastering offers the highest possible speed available on the PCI- 9112. When the function _9112_AD_Set_Mode is set as AD_MODE_2 ( Timer Trigger & DMA transfer ) or AD_MODE_5 ( External Trigger & DMA transfer), it will enable PCI bus master operation. This is conceptually similar to DMA (Direct Memory Access) transfers in a PC but is really PCI bus mastering. It does not use an 8237-style DMA controller in the host computer and therefore isn't blocked in 64K max. groups. PCI-

9112 bus mastering works as follows:

1.To set up bus mastering, first do all normal PCI-9112 initialization necessary to control the board in status mode. This includes testing for the presence of the PCI BIOS, determining the base addresses, slot number, vendor and device ID's, I/O or memory, space allocation, etc. Please make sure your PCI-9112 is plug in a bus master slot, otherwise this function will not be workable.

2.Load the PCI controller with the count and 32 -bit physical address of the start of previously allocated destination memory which will accept A/D data. This count is the number of bytes (not longwords!) transferred during the bus master operation and can be a large number up to 64 million (2^26) bytes. Since the PCI-9112 transfers are always longwords, this is 16 million longwords (2^24) or 32 million A/D samples but use the byte count.

C/C++ Library 51

Image 59
Contents Page Trademarks ALL Rights ReservedQuestions Adlink Technology IncDetailed Company Information Page Contents 9112DblBufferTransfer 9112GetOverrunStatus ConversionConversion Digital Input and Output 9112DO 9112DA 9112ADSetChannel 9112ADSetRangePCI Scan Utility Appendix A. Demo. Programs Product Warranty/ServiceWhat do you need VR Assignment Adjustment Software UtilitiesHow to Use This Guide Introduction ∙ FeaturesT r o d u c t i o n Analog Output D/A SpecificationsApplications Analog Input A/DProgrammable Counter General SpecificationsDigital I/O DIO PCIS-LVIEW LabVIEW Driver Software SupportingProgramming Library PCIS-DDE DDE Server and InTouchTM PCIS-VEE HP-VEE DriverDAQBenchTM ActiveX Controls DASYLabTM PROWhat You Have Installation∙ Installation Unpacking Device Installation for Windows SystemsInstallation ∙ PCI -Bus Controller PCB LayoutPCI-9112 Layout ConverterPCB Layout of the PCI-9112 CPCI-9112 Layout10 ∙ Installation Jumper SettingsAnalog Input Channel Configuration D/A Reference Voltage Setting Clock Source Setting12 ∙ Installation Internal Reference Voltage SettingPin Assignments of PCI-9112 Connectors Pin AssignmentsCN 3 Analog Input / Output & Counter/Timer 14 ∙ Installation CN 1 Digital Signal Input DI 0CN 2 Digital Signal Output do 0 Pin Assignments of cPCI-9112 16 ∙ Installation Hardware Installation OutlineConnect with ACLD-9182 Daughter Board ConnectionConnect with ACLD-8125 Connect with ACLD-9137Connect with ACLD-9138 and ACLD-9188 18 ∙ InstallationConnect with ACLD-9185 Registers Format ∙ G i s t e r s F o r m a tI/O Registers Map 20 ∙ Registers Format A/D Data RegistersD/A Output Register 22 ∙ Registers Format A/D control RegisterMode MUX Register Bit8 ~ Bit5 Auto-Scan Bit24 ∙ Registers Format Software Trigger Register A/D Status Register26 ∙ Registers Format Digital I/O registerLow Level Programming Internal Timer/Counter RegisterHigh Level Programming 28 ∙ Operation Theorem Analog Input Signal ConnectionE r a t i o n T h e o r e m A/D ConversionOperation Theorem ∙ Single-ended ModeDifferential input mode 30 ∙ Operation Theorem 4 Floating source and differential inputSoftware trigger 1 A/D Conversion ProcedureTimer Pacer Trigger 2 A/D Trigger ModesInterrupt Transfer Intx 3 A/D Data Transfer ModesExternal Trigger Software Data Transfer DrdyDMA Transfer Dmax D/A Conversion34 ∙ Operation Theorem Digital Input and OutputCounter Timer/Counter Operation36 ∙ Operation Theorem General Purpose Timer/ CounterPacer Trigger Source AddressControl Byte 38 ∙ Operation Theorem Mode Definitions++ Library ∙ Libraries Installation+ + L i b r a r y 40 ∙ C/C++ Library Programming GuideNaming Convention Data TypesReturn Code 9112InitialSyntax Argument42 ∙ C/C++ Library 9112DI9112DI Channel Description9112DO 44 ∙ C/C++ Library 9112DA9112ADSetChannel 46 ∙ C/C++ Library 9112ADSetRangeCardnumber the card number of PCI-9112 10 9112ADSetMode48 ∙ C/C++ Library 11 9112ADSetAutoscan12 9112ADSoftTrig 50 ∙ C/C++ Library 13 9112ADAquire14 9112ADDMAStart 52 ∙ C/C++ Library 15 9112ADDMAStatus 54 ∙ C/C++ Library 16 9112ADDMAStop17 9112ContDmaStart 56 ∙ C/C++ Library 18 9112CheckHalfReady20 9112GetOverrunStatus 19 9112DblBufferTransfer58 ∙ C/C++ Library 21 9112ContDmaStop22 9112ADINTStart 60 ∙ C/C++ Library 23 9112ADINTStatus24 9112ADINTStop 25 9112ADTimer62 ∙ C/C++ Library 2MHz / c1 * c227 9112TIMERRead 26 9112TIMERStart64 ∙ C/C++ Library 28 9112TIMERStop29 9112AllocDMAMem Argument cardnumber countervalue32 9112GetSample 30 9112FreeDMAMem66 ∙ C/C++ Library Calibration ∙ CalibrationWhat do you need Unipolar Calibration A/D AdjustmentVR Assignment Bipolar Calibration2 D/A Channel Calibration D/A AdjustmentReference Voltage Calibration 70 ∙ Software Utility Software UtilitiesSoftware Utility Software Utility ∙ System ConfigurationRunning the Utility Calibration72 ∙ Software Utility Functional TestingPCI Scan Utility Appendix a Demo Programs ∙ P e n d i x a . D e m o O g r a m sDOS Software Windows 95 DLL74 ∙ Appendix a Demo Programs Product Warranty/Service ∙ Product Warranty/Service