NuDAQ ACL-8112 Series User Manual

Enhanced multi-functions data acquisition cards
Table of Contents

Advertisement

Quick Links

NuDAQ
ACL-8112 Series
Enhanced Multi-Functions
Data Acquisition Cards
User's Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ACL-8112 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for NuDAQ ACL-8112 Series

  • Page 1 NuDAQ ACL-8112 Series Enhanced Multi-Functions Data Acquisition Cards User’s Guide...
  • Page 2 Trademarks NuDAQ, ACL-8112 are registered trademark of ADLINK Technology Inc.. Other product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of...
  • Page 3 Customer Satisfaction is always the most important thing for ADLINK Technology Inc. If you need any help or service, please contact us and get it. ADLink Technology Inc. Web Site http://www.adlink.com.tw Sales & Service service@adlink.com.tw Technical NuDAQ nudaq@adlink.com.tw Support NuDAM nudam@adlink.com.tw NuIPC nuipc@adlink.com.tw NuPRO nupro@adlink.com.tw...
  • Page 5: Table Of Contents

    Contents Chapter 1 Introduction ..............1 Features................3 Applications................ 3 Specifications..............4 Software Support..............7 1.4.1 Programming Library..............7 1.4.2 LabView Driver................7 Chapter 2 Installation ..............8 What You Have ..............8 Unpacking................9 ACL-8112's Layout............. 10 Jumper and DIP Switch Description ......... 12 Base Address Setting............
  • Page 6 A/D Data Registers............29 A/D Channel Multiplexer Register........29 A/D Range Control Register..........31 A/D Operation Mode Control Register....... 34 Interrupt Status Register........... 34 Software Trigger Register..........35 Digital I/O register............. 35 D/A Output Register ............37 4.10 Internal Timer/Counter Register ........37 Chapter 5 Operation Theorem............
  • Page 7 7.13 _8112_CLR_IRQ..............70 7.14 _8112_AD_DMA_Start ............70 7.15 _8112_AD_DMA_Status............74 7.16 _8112_AD_DMA_Stop ............74 7.17 _8112_AD_INT_Start ............75 7.18 _8112_AD_INT_Status............76 7.19 _8112_AD_INT_Stop ............78 7.20 _8112_AD_Timer ............... 78 7.21 _8112_TIMER_Start............79 7.22 _8112_TIMER_Read............81 7.23 _8112_TIMER_Stop............82 Appendix A. Demo Programs............83 Product Warranty/Service.............
  • Page 8: How To Use This Guide

    How to Use This Guide This manual is designed to help you use the ACL-8112. The manual describes how to modify various setti ngs on the ACL-8112 card to meet your requirements. It is divided into seven chapters: Ø Chapter 1, "Introduction," gives an overview of the product features, applications, and specifications.
  • Page 9: Chapter 1 Introduction

    The ACL-8112 is a high performance, high speed multi -function data acquisition card for the IBM PC or compatible computers. The ACL-8112 series is designed to combine all the data acquisition functions, such as A/D, D/A, DIO, and timer/counter in a single board, The high-end specifications of the card makes it ideal for wide range of applications requiring high speed 12-bit data acquisition at low cost.
  • Page 10 Introduction...
  • Page 11: Features

    Features The ACL-8112 series Enhanced Multi -function Data Acquisition Card provides the following advanced features: Ø AT-Bus Ø 16 single-ended or 8 differential analog input channels for ACL- 8112DG/HG, 16 single-ended for ACL-8112PG. Ø Bipolar or unipolar input signals for ACL-8112DG/HG, bipolar for ACL-8112PG.
  • Page 12: Specifications

    Ø Waveform and pulse generation Ø BCD interface driver Specifications Analog Input (A/D) Ø Converter: ADS774 or equivalent, successive approximation type Ø Resolution: 12-bit Ø Number of channels: ACL-8112DG/HG: 16 single-ended or 8 differential ACL-8112PG: 16 single-ended Ø Input Range: (Programmable) Ø...
  • Page 13 (ACL-8112PG) GAIN = 0.5, 1, 2, 4 0.015% of FSR 1 LSB GAIN = 8, 16 0.02% of FSR 1 LSB Ø Input Impedance: 10 M Ø AD converstion trigger modes: Software, Pacer, and External trigger Ø Data Transfer: Pooling, DMA, Interrupt Ø...
  • Page 14 Ø Driving Capacity: Low: Max. +0.5V at 8.0mA ( Sink) High: Min. 2.7V at 0.4mA( Source) Programmable Counter Ø Device: 8254 Ø A/D pacer: 32-bit timer( two 16-bit counter cascaded together) with a 2MHz time base Ø Pacer Output: 0.00046 Hz ~ 100 KHz Ø...
  • Page 15: Software Support

    For the customers who are writing their own programs, we provide MS- DOS Borland C/C++ programming library. ACLS-DLL2 is the Development Kit for NuDAQ ISA-Bus Cards with Analog I/O, windows 3.1/95(98)/NT. ACLS-DLL2 can be used for many programming environments, such as VC++, VB, Delphi. ACLS-DLL2 is included in the ADLINK CD.
  • Page 16: Chapter 2 Installation

    Installation This chapter describes how to install the ACL-8112 series products. Please follow the following steps to install. Ø Check what you have (section 2.1) Ø Unpacking (section 2.2) Ø Check the PCB and jumper location(section 2.3) Ø Install the hardware and setup and jumpers and switch (section 2.4~2.12)
  • Page 17: Unpacking

    Unpacking Your ACL-8112 card contains sensitive electronic components that can be easily damaged by static electricity. The card should be done on a grounded anti-static mat. The operator should be wearing an anti -static wristband, grounded at the same point as the anti-static mat.
  • Page 18: Acl-8112'S Layout

    ACL-8112's Layout ....... . Figure 2.1-1 PCB Layout of the ACL-8112DG/HG Ver C. Installation...
  • Page 19 ....... . Figure 2.1-2 PCB Layout of the ACL-8112PG Installation...
  • Page 20: Jumper And Dip Switch Description

    Jumper and DIP Switch Description You can change the ACL8112's channels and the base address by setting jumpers and DIP switches on the card. The card's jumpers and switches are preset at the factory. You can change the jumper settings for your own applications.
  • Page 21: Analog Input Channel Configuration

    I/O port Address(Hex) 200-20F 210-21F 220-22F (default) 230-23F 300-30F 3F0-3FF A0, ..., A9 is corresponding to PC Bus address lines A9 is fixed as “1”. Table 2.2 Possible Base Address Combinations How to define the base address for the ACL-8112 ? The DIP1 to DIP6 in the switch SW1 are one to one corresponding to the PC bus address line A8 to A4.
  • Page 22: Dma Channel Setting

    The ACL-8112 offer 16 single-ended or 8 differential analog input channels. The jumper JP3 controls the analog input channel configuration. The setting of JP3 is specified as following illustration. Figure 2.3 Analog Input Channels Configuration DMA Channel Setting The A/D data transfer of ACL-8112 is designed with DMA transfer capability.
  • Page 23: Internal/External Trigger Setting

    DACK JP7/JP1 JP8/JP2 1 3 X DMA 1 (Default) DMA 3 Figure 2.4 DMA Channel Setting Internal/External Trigger Setting The A/D conversion trigger source of ACL-8112 comes from internal or external. The internal or external trigger source is setting by JP4 of ACL- 8112DG/HG or JP5 of ACL-8112PG, as shown on Figure 2.5.
  • Page 24 JP6 / JP4 Internal Clock INTCLK Source : 2MHz (default setting) EXTCLK JP6 / JP4 INTCLK External Clock Source EXTCLK Figure 2.6 Timer's Clock Source Setting Installation...
  • Page 25: Clock Source Setting

    Clock Source Setting The 8254 programmable interval timer is used in the ACL-8112. It provides 3 independent 16-bit programmable down counters. The input of counter 2 is connected to a precision 2MHz oscillator for internal pacer. The input of counter 1 is cascaded from the output of counter 2. The channel 0 is free for user's applications.
  • Page 26: D/A Reference Voltage Setting

    2.11 D/A Reference Voltage Setting The D/A converter's reference voltage source can be internal or external generated. The external reference voltage comes from connector CN3 pin 31(ExtRef1) and pin12(ExtRef2), see section 3.1. The reference source of D/A channel 1 and channel 2 are selected by JP2 of ACL-8112DG/HG or JP6 and JP7 of ACL-8112PG respectively.
  • Page 27: A/D Input Range Setting

    The internal voltage is -5V or -10V which can is selected by JP1 of ACL- 8112DG/HG or JP8 of ACL-8112PG. The possible configurations are specified as Figure 2.9. Note that the internal reference voltage is used only when the JP2 of ACL-8112DG/HG or JP6 nd JP7 of ACL-8112PG is set to internal reference.
  • Page 28: Chapter 3 Signal Connections

    Signal Connections This chapter describes the connector of the ACL-8112, also the signal connection between the ACL-8112 and external devices, such as daughter boards or other devices. Connectors Pin Assignment The ACL-8112 comes equipped with two 20-pin insulation displacement connectors - CN1 and CN2 and one 37-pin D-type connector - CN3. The CN1 and CN2 are located on board and CN3 located at the rear plate.
  • Page 29 Figure 3.1. Pin Assignment of CN2 Ø CN1: Digital Signal Output (DO 0 - 15 ) DO 0 DO 1 DO 2 DO 3 DO 4 DO 5 DO 6 DO 7 DO 8 DO 9 11 12 DO 10 DO 11 13 14 DO 12...
  • Page 30: Analog Input Signal Connection

    Figure 3.3a. Pin Assignment of CN3 Ø CN 3: Analog Input/Output & Counter/Timer ( for differential connection:: ACL-8112DG/HG) AIH0 AIL0 AIH1 AIL1 AIH2 AIL2 AIH3 AIL3 AIH4 AIL4 AIH5 AIL5 AIH6 AIL6 AIH7 AIL7 A.GND A.GND A.GND A.GND V.REF ExtRef2 ExtRef1 +12V A.GND...
  • Page 31 of A/D conversion, it is quite important to understand the signal source type and how to choose the analog input modes: signal-ended and differential. The ACL-8112 offers jumpers to select 16 single-ended or 8 different analog inputs. Single-ended Mode: The single-ended mode has only one input relative to ground and it suitable for connecting with the floating signal source.
  • Page 32: Analog Output Signal Connection

    Figure 3.5 Ground source and differential input A differential mode must be used when the signal source is differential. A differential source means the ends of the signal are not grounded. To avoid the danger of high voltage between the local ground of signal and the ground of the PC system, a shorted ground path must be connected.
  • Page 33: Digital I/O Connection

    The ACL-8112 has two unipolar analog output channels. To make the D/A output connections from the appropriate D/A output, please refer Figure 3.7. -5 or -10 INT or Ext Pin-30 ( AO0) Ref In Pin-32 ( AO1) D/A Converter To D/A Output Pin-14 ( A.GND) Analog GND Figure 3.7 Connection of Analog Output Connection...
  • Page 34: Daughter Board Connection

    counter 0 is free for your applications. Figure 3.9 shows the 8254 timer/counter connection. 8254 Timer/Counter CN3 Pin-37 Counter 0 CLK0 GATE0 Pin- CN3 Pin-33 OUT0 CN3 Pin-16 Counter 1 CLK1 CN3 Pin-34 GATE1 OUT1 A/D Trigger CN3 Pin-35 2MHz Counter 2 Oscillator CLK2...
  • Page 35: Connect With Acld-9182

    It is very suitable for the simple applications that do not need complex signal condition before the A/D conversion is performed. 3.6.5 Connect with ACLD-9182 The ACLD-9182 is a 16 channel isolated digital input board. This board is connected with CN1 of ACL-8112 via 20-pin flat cable. The advantage of board is an 500Vdc isolation voltage is provided, and it can protect your PC system from damage when an abnormal input signal is occurred.
  • Page 36: Chapter 4 Registers Format

    Registers Format The detailed descriptions of the register format and structure of the ACL- 8112 are specified in this chapter. This information is quite useful for the programmer who wish to handle the card by low-level program. In addition, the low level programming syntax is introduced. This information can help the beginners to operate the ACL-8112 in the shortest learning time.
  • Page 37: A/D Data Registers

    Table 4.1 I/O Address A/D Data Registers The ACL-8112 series are 12-bit resolution for analog input channels, the digital data will store in the A/D data registers. The A/D data is put into two 8 bits registers. The low byte data (8 LSBs) are put in address BASE+4 and the high byte data (4 MSBs) are put in address BASE+5.
  • Page 38 CL3 is MSB, and CL0 is LSB. CS0, CS1: Single-ended and Differential Selection (ACL-8112DG/HG only) CS0 and CS1 are used to determine which MPC508A chip is selected. The MPC508A is used to multiplex channel from channel, when CS0 is set as 1, the analog input channels from 0 to 7 is selectable, and CS1 is set, the ch 8 to ch 15 can be selectable.
  • Page 39: A/D Range Control Register

    S.E.: Single-ended Analog Input D.I.: Differential Analog Input A/D Range Control Register The A/D range register is used to adjust the analog input ranges for A/D channels. Two factor will effect the input range: Gain and Bipolar/Unipolar. For ACL-8112PG, This register contols the PGA( programmable gain) directly and there is no Unipolar setting.
  • Page 40 1,000 Unipolar Table 4.2-1 Function of the Gain Control Bits Registers Format...
  • Page 41 ( This table is only for ACL-8112DG: Low Gain Card) Bipolar GAIN Input Range Unipolar Bipolar Bipolar Bipolar 2.5V Bipolar 1.25V Bipolar 0.625V Unipolar 0V ~ 10V Unipolar 0V ~ 5V Unipolar 0V ~ 2.5V Unipolar 0V ~ 1.25V Table 4.2-2 Function of the Gain Control Bits In the ACL-8112PG, the maximum can be changed by hardware jumper setting.
  • Page 42: A/D Operation Mode Control Register

    A/D Operation Mode Control Register The A/D operation includes the analog signal conversion and the data transformation. This register controls the internal trigger mode and data transformation method. It is initialized as software trigger and program polling transfer when your PC is reset or power on. The details of the A/D operation is illustrated in Chapter 5.
  • Page 43: Software Trigger Register

    this register, let the ACL-8112 can generate next interrupt if a new A/D conversion is happen. Address : BASE + 8 Attribute: write only Data Format: BASE+8 Software Trigger Register If you want to generate a trigger pulse to the ACL-8112 for A/D conversion, you just write any data to this register, and then the A/D converter will be triggered.
  • Page 44 Base + 14 DO15 DO14 DO13 DO12 DO11 DO10 DO9 Registers Format...
  • Page 45: D/A Output Register

    D/A Output Register The D/A converter will convert the D/A output register data to the analog signal. The register data of the address Base + 4 and Base + 5 are used for D/A channel 1, Base +6 and Base +7 are used for D/A channel 2. Address : BASE + 4 &...
  • Page 46 Base + 2 Counter 2 Register ( R/W) Base + 3 8254 CONTROL BYTE Registers Format...
  • Page 47: Chapter 5 Operation Theorem

    Operation Theorem The operation theorem of the functions on ACL-8112 card is described in this chapter. The functions include the A/D conversion, D/A conversion, digital I/O and counter / timer. The operation theorem can help you to understand how to manipulate or to program the ACL-8112. A/D Conversion Before programming the ACL-8112 to perform the A/D conversion, you should understand the following issues:...
  • Page 48: A/D Trigger Modes

    5.1.2 A/D Trigger Modes In the ACL-8112, A/D conversion can be triggered by the Internal or External trigger source. The jumper JP5 is used to select the internal or external trigger, please refer to section 2.8 for details. Whenever the external source is set, the internal sources are disable.
  • Page 49 mode control register (BASE+11). The different transfer modes are specified as follows: Operation Theorem 41...
  • Page 50: D/A Conversion

    Software Data Transfer Usually, this mode is used with software A/D trigger mode. After the A/D conversion is triggered by software, the software should poll the DRDY bit until it becomes to high level. Whenever the low byte of A/D data is read, the DRDY bit will be cleared to indicate the data is read out.
  • Page 51: Digital Input And Output

    section 4.9 for information about the D/A data registers. mathematical relationship between the digital number DAn and the output voltage is formulated as following: Vout Vref 4096 where the Vref is the reference voltage, the Vout is the output voltage, and the DAn is the digital value in D/A data registers.
  • Page 52 control words. The most commonly uses for the 8254 in microprocessor based system are: Ø programmable baud rate generator Ø event counter Ø binary rate multiplier Ø real-time clock Ø digital one-shot Ø motor control For more information about the 8254 , please refer to the NEC Microprocessors and peripherals or Intel Microsystems Components Handbook.
  • Page 53 Control Byte Before loading or reading any of these individual counters, the control byte (BASE+3) must be loaded first. The format of the control byte is: Operation Theorem 45...
  • Page 54 SC1 & SC0 - Select Counter ( Bit7 & Bit 6) COUNTER Select Counter 0 Select Counter 1 Select Counter 2 ILLEGAL RL1 & RL0 - Select Read/Load operation ( Bit 5 & Bit 4) OPERATION COUNTER LATCH FOR STABLE READ READ/LOAD LSB ONLY READ/LOAD MSB ONLY READ/LOAD LSB FIRST, THEN MSB...
  • Page 55 Mode 5: Hardware Triggered Strobe. All detailed description of these six modes are written in Intel Microsystems Components Handbook Volume II Peripherals. Operation Theorem 47...
  • Page 56: Chapter 6 Calibration & Utilities

    Calibration & Utilities In data acquisition process, how to calibrate your measurement devices to maintain its accuracy is very important. Users can calibrate the analog input and analog output channels under the users' operating environment for optimizing the accuracy. This chapter will guide you to calibrate your ACL-8112 to an accuracy condition.
  • Page 57: A/D Adjustment

    Table 6.1-1 Function of VRs There are five variable resistors (VR) on the ACL-8112PG board to allow you making accurate adjustment on A/D and D/A channels. The function of each VR is specified as Table 6.1 -2. D/A channel 1 full scale adjustment D/A channel 2 full scale adjustment A/D full scale adjustment A/D programmable amplifier offset adjustment...
  • Page 58: D/A Adjustment

    D/A Adjustment There are two steps to calibrate the analog output channels, D/A 1 and D/A 2. The first step is to adjust the reference voltage, and the second step is to adjust each channel of D/A. D/A Channel Calibration D/A CH1 calibration: 1.
  • Page 59: Chapter 7 C Language Library

    C Language Library There are 23 function calls provided by the C Language Library, all the functions of ACL-8112 are covered by this library, its capabilities include A/D conversion, D/A conversion, Digital Input and Output, etc. Using the C Language library saves a lot of programming time and has some other benefits as well.
  • Page 60 int _8112_Initial(int card_number, int type, int base_addresss ) int _8112pg_Initial(int card_number, int base_addresss ) Argument: card_number: the card number to be initialized, only cards can be initialized, the card number must be CARD_1 or CARD_2. Type : there are 4 different types of ACL-8112 cards, they are, A8112B_ HG: 8112 High Gain card Ver.
  • Page 61 ErrCode = _8112_Initial( CARD_2, A8112B_DG, 0x220 ); if ( ErrCode != ERR_NoError ) exit(0); C Language Library...
  • Page 62: 8112_Switch_Card_No

    _8112_Switch_Card_No Description This function is used on dual-cards system. After initialized two ACL- 8112 cards, this function is used to select which card is used currently. Note: In this library, only two ACL-8112 can be initialized. The reason is only two DMA channels are supported in the card. Syntax int _8112_Switch_Card_No(int card_number) int _8112pg_Switch_Card_No(int card_number)
  • Page 63: Di _Channel

    _8112_DI Description This function is used to read data from digital input port. There are 16-bit digital inputs on the ACL-8112. The bit 0 to bit 7 are defined as low byte and the bit 8 to bit 15 are defined as the high byte. Syntax int _8112_DI( int port_number, unsigned char *data ) int _8112pg_DI( int port_number, unsigned char *data )
  • Page 64 Argument: di_ch_no: the DI channel number, the value has to be set from 0 to 15. data: return value, either 0 or 1. Return Code: ERR_NoError ERR_BoardNoInit ERR_InvalidDIChannel Example: #include “8112.h” main() unsigned int data; _8112_Initial( CARD_1, A8112B_HG, 0x220 ); /* Assume NoError when Initialize ACL-8112 */ for( ch=0;...
  • Page 65 Syntax int _8112_DO(int port_number, unsigned char data ) int _8112pg_DO(int port_number, unsigned char data ) Argument: port_number: DO_LO_BYTE or DO_HI_BYTE data: value will be written to digital output port Return Code: ERR_NoError ERR_BoardNoInit ERR_PortError Example: #include “8112.h” main() _8112_Initial( CARD_1, A8112B_DG, 0x220 );...
  • Page 66 resolution of each channel is 12-bit, i.e. the digital data range is from 0 to 4095. Syntax int _8112_DA(int da_ch_no, unsigned int data ) int _8112pg_DA(int da_ch_no, unsigned int data ) C Language Library...
  • Page 67: 8112_Ad_Input_Mode

    Argument: da_ch_no: D/A channel number, DA_CH_1 or DA_CH_2. data: D/A converted value, if the value is greater than 4095, the higher 4-bits are negligent. Return Code: ERR_NoError ERR_BoardNoInit ERR_InvalidDAChannel Example: #include “8112.h” main() _8112_Initial( CARD_1, A8112B_DG, 0x220 ); /* Assume NoError when Initialize ACL-8112 */ /* if the hardware setting for DA output range is 0~5V */ _8112_DA( DA_CH_1 , 0x800 );...
  • Page 68 Syntax int _8112_AD_Input_Mode( int ad_mode ) Argument: ad_ch_mode: SINGLE_ENDED : the analog inputs are single-ended mode. DIFFERENTIAL : the analog inputs are differential. Return Code: ERR_NoError ERR_BoardNoInit ERR_InvalidADChannel Example: #include “8112.h” main() _8112_Initial( CARD_1, A8112B_DG, 0x210 ); /* Assume ERR_NoError when Initialize ACL-8112 */ _8112_Initial( CARD_2, A8112B_HG, 0x220 );...
  • Page 69 _8112_AD_Set_Channel( j ); printf( "AD channel %d is now selected.\n“, j ); /* the following A/D's operation is based on channel 3 C Language Library...
  • Page 70: 8112_Ad_Set_Channel

    _8112_AD_Set_Channel Description This function is used to set AD channel by means of writing data to the multiplexer scan channel register. There are 16 single-ended A/D channels in ACL-8112, so the channel number should be set between 0 to 15 only. The initial state is channel 0 which is a default setting by the ACL-8112 hardware configuration.
  • Page 71 C Language Library...
  • Page 72: 8112_Ad_Set_Range

    _8112_AD_Set_Range Description This function is used to set the A/D analog input range by means of writing data to the A/D range control register. There are two factors will change the analog input range - Gain and Input type. The Gain can be choice from 0.5, 1, 5, 10, 50, 100, 500, and 1,000 for ACL-8112HG card.
  • Page 73 For ACL-8112DG card, the gain values only support 1, 2, 4, 8 four levels. The relationship between analog input voltage range, gain and input type are specified by table on next page. ** this table is suitable for ACL-8112DG ( low gain) card. Input type AD_INPUT GAIN...
  • Page 74 Argument: int ad_range: the programmable range of A/D conversion, pleas refer to above tables for the possible values . Return Code: ERR_NoError ERR_BoardNoInit ERR_AD_InvalidRange Example: #include “8112.h” main() _8112_Initial( CARD_1, A8112B_HG, 0x220 ); /* Assume NoError when Initialize ACL-8112 */ _8112_AD_Input_Mode( DIFFERENTIAL) ;...
  • Page 75: 8112_Ad_Set_Mode

    7.10 _8112_AD_Set_Mode Description This function is used to set the A/D trigger and data transfer mode by means of writing data to the mode control register. The hardware initial state of the ACL-8112 is set as AD_MODE_1 software( internal) trigger with program polling data. A/D Mode Description AD_MODE_0...
  • Page 76: 8112_Ad_Soft_Trig

    /* Assume NoError when Initialize ACL-8112 */ _8112_AD_Input_Mode( DIFFERENTIAL) ; /* set analog input mode as “differential” mode */ _8112_AD_Set_Range( AD_B_5_V ); printf( "The A/D analog input range is +/- 5V \n" ); _8112_AD_Set_Mode( AD_MODE_6 ); printf( "Now, disable internal trigger.\n" ); /* All A/D conversion will be trigger by internal timer pacer, and the converted data should be transfered in the interrupt service routine.
  • Page 77: 8112_Ad_Aquire

    main() _8112_Initial( CARD_1, 8112DG, 0x220 ); /* Assume NoError when Initialize ACL-8112 */ _8112_AD_Soft_Trig(); printf( "Now, AD is triggered.\n" ); _8112_AD_Aquire( &data); 7.12 _8112_AD_Aquire Description This function is used to poll the AD conversion data. It will trigger the AD conversion, and read the 12-bit A/D data when the data is ready ('data ready' bit becomes low).
  • Page 78: 8112_Clr_Irq

    _8112_Initial( CARD_1, 8112B-DG, 0x220 ); /* Assume NoError when Initialize ACL-8112 */ /* Set to software trigger at first*/ _8112_AD_Set_Mode( AD_MODE_1 ); /* then trigger the AD */ _8112_AD_Soft_Trig(); /* wait for AD data ready then read it */ ErrCode = _8112_AD_Aquire( &ad_data ); if( ErrCode == ERR_NoError ) printf( "The AD value is %d.\n", ad_data );...
  • Page 79 The function will perform A/D conversion N times with DMA data transfer by using the pacer trigger ( internal timer trigger). It takes place in the background which will not be stop until the Nth conversion has been completed or your program execute _8112_AD_DMA_Stop() function to stop the process.
  • Page 80 Syntax int _8112_DMA_Start( int ad_ch_no, int ad_range, int dma_ch_no, int irq_ch_no int count , int *ad_buffer unsigned int c1, unsigned int c2) int _8112pg_DMA_Start( int ad_ch_no, int ad_gain, int dma_ch_no, int irq_ch_no int count , int *ad_buffer unsigned int c1, unsigned int c2) Argument: ad_ch_no: A/D channel number ad_range:...
  • Page 81 Example: See Demo Program 'AD_Demo4.C' C Language Library...
  • Page 82: 8112_Ad_Dma_Status

    7.15 _8112_AD_DMA_Status Description Since the _8112_AD_DMA_Start function is executed in background, you can issue the function _8112_AD_DMA_Status to check its operation status. Syntax int _8112_AD_DMA_Status( int *status , int *count ) int _8112pg_AD_DMA_Status( int *status , int *count ) Argument: status: status of the DMA data transfer 0: AD DMA is not completed...
  • Page 83: 8112_Ad_Int_Start

    count: the number of A/D converted data which been transferred. Return Code: ERR_NoError ERR_BoardNoInit ERR_AD_DMANotSet Example: See demo program 'AD_Demo4.C' 7.17 _8112_AD_INT_Start Description The function will perform A/D conversion N times with interrupt data transfer by using pacer trigger. It takes place in the background which will not be stopped until the Nth conversion has been completed or your program execute _8112_AD_INT_Stop() function to stop the process.
  • Page 84: 8112_Ad_Int_Status

    ad_buffer: the start address of the memory buffer store the A/D data, the buffer size must be large than the number of A/D conversion. the 16-bit timer frequency divider of timer channel #1 the 16-bit timer frequency divider of timer channel #2 Return Code: ERR_NoError...
  • Page 85 ERR_AD_INTNotSet Example: See demo program 'AD_Demo2.C' C Language Library...
  • Page 86: 8112_Ad_Int_Stop

    7.19 _8112_AD_INT_Stop Description This function is used to stop the interrupt data transfer function. After executing this function, the internal AD trigger is disable and the AD timer is stopped. The function returns the number of the data which has been transferred, no matter whether the AD interrupt data transfer is stopped by this function or by the _8112_AD_INT_Start() itself.
  • Page 87: 8112_Timer_Start

    int _8112pg_AD_Timer( unsigned int c1 , unsigned int c2 ) Argument: frequency divider of timer #1 frequency divider of timer #2, Note: the A/D sampling rate is equal to: 2MHz / (c1 * c2), when c1 = 0 or c2 = 0, the pacer trigger will be stopped. Return Code: ERR_NoError ERR_BoardNoInit...
  • Page 88 be used as frequency generator if internal clock is used. It also can be used as event counter if external clock is used. All the 8253 mode is available. C Language Library...
  • Page 89: 8112_Timer_Read

    Syntax int _8112_TIMER_Start( int timer_mode, unsigned int c0 ) int _8112pg_TIMER_Start( int timer_mode, unsigned int c0 ) Argument: timer_mode: the 8253 timer mode, the possible values are: TIMER_MODE0, TIMER_MODE1, TIMER_MODE2, TIMER_MODE3, TIMER_MODE4, TIMER_MODE5. the counter value of timer Return Code: ERR_NoError ERR_BoardNoInit ERR_InvalidTimerMode...
  • Page 90: 8112_Timer_Stop

    7.23 _8112_TIMER_Stop Description This function is used to stop the timer operation. The timer is set to the 'One-shot' mode with counter value ' 0 '. That is, the clock output signal will be set to high after executing this function. Syntax int _8112_TIMER_Stop( unsigned int *counter_value ) int _8112pg_TIMER_Stop( unsigned int *counter_value )
  • Page 91: Appendix A. Demo Programs

    Appendix A. Demo Programs In this software diskette, there are 8 demonstration programs are provided. They could help you to program your application by using C Language Library easily. The description of these programs are specified as follows: AD_DEMO1.C: A/D conversion uses software trigger and program data transfer.
  • Page 92: Product Warranty/Service

    Product Warranty/Service Seller warrants that equipment furnished will be free form defects i n material and workmanship for a period of one year from the confirmed date of purchase of the original buyer and that upon written notice of any such defect, Seller will, at its option, repair or replace the defective item under the terms of this warranty, subject to the provisions and specific exclusions listed herein.

Table of Contents