Home

PCM-3718 Series User Manual

image

Contents

1. HIGH Vs Vin LN z AGND 25 Chapter 3 If the signal source has one side connected to local ground the signal source ground and PCM 3718 s ground will not be at exactly the same voltage as they are connected through the ground return of the equipment and building wiring The difference between the ground voltages form a common mode voltage To avoid the ground loop noise effect caused by common mode voltages connect the signal ground to the LOW input Do not connect the LOW input to the PCM 3718 s ground directly In some cases you may also need a wire connection between the PCM 3718 s ground and the signal source ground for better grounding The following two diagrams show correct and incorrect connections for a differential input with local ground Correct Connection Incorrect Connection PCM 3718 Series User Manual 26 3 3 Expanding Analog Inputs You can expand any or all of PCM 3718 s A D input channels by using multiplexing daughterboards Most daughterboards are connected directly to the module s 20 pin connectors You may require the PCLD 8115 Screw terminal Board for connections The PCLD 789 Amplifier and Multiplexer multiplexes 16 differential inputs to one A D input channel You can cascade up to eight PCLD 789s to the PCM 3718H 3718HG for a total of 128 channels The PCLD 8115 Screw terminal Board makes wiring connections easy It provides 20 pin flat cable connectors and a CJ
2. eee 67 9 2 2 A D Calibration Procedures eee 67 Appendix A Software Driver User Note 70 vii Table of Contents PCM 3718 Series User Manual viii General Information This chapter introduces the PCM 3718 Series and provides detailed specifica tions Chapter 1 General Information 1 1 Introduction The PCM 3718 Series consist of high performance multifunction data acquisition modules that attach to the PC 104 connector on your CPU card or PC 104 module It offers 12 bit A D conversion and digital input output The automatic channel scanning circuitry and the onboard SRAM let you perform multiple channel A D conversions with DMA and individual channel gains These PC 104 modules are fully software compatible with the popular PCL 818H and PCL 818HG This puts rich software support and a wide variety of external signal conditioning boards at your disposal The PCM 3718 Series is excellent for data acquisition process control automatic testing and factory automation 1 2 Features 16 single ended or 8 differential analog inputs jumper selectable 12 bit A D converter up to 100 kHz sampling rate with DMA transfer Software programmable gain value for each analog input channel Software selectable input range for each analog input channel Two 8 bit digital input output channels TTL compatible Flexible triggering options software trigger programm
3. PCM 3718 Series PC 104 12 bit DAS Module with Programmable Gain User Manual Copyright This documentation and the software included with this product are copyrighted 2009 by Advantech Co Ltd All rights are reserved Advan tech Co Ltd reserves the right to make improvements in the products described in this manual at any time without notice No part of this manual may be reproduced copied translated or transmit ted in any form or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reliable However Advantech Co Ltd assumes no responsibility for its use nor for any infringements of the rights of third parties which may result from its use Acknowledgments PC LabCard and ADAQView are registered trademarks of Advantech Co Ltd other brands trademarks or products listed are tradenames or trademarks of their respective companies This Manual Covers the Following Models PCM 3718H 12 bit multifunction module with programmable gain PCM 3718HG 3718 with high gain PCM 3718HO 3718 with analog output CE Notification The products of the PCM 3718 Series developed by Advantech Co Ltd have all passed the CE test for environmental specifications when shielded cables are used for external wiring We recommend the use of shielded cables This kind of cable is available from Advantech Part No 2003
4. ener ertet treten 12 Switch and Jumper Settings sse 13 2 2 1 Base Address Selection SW1 sse 13 Table 2 1 Module I O Addresses SW1 13 Table 2 2 PC bus Address Control DIM ES 2 2 2 DMA Channel and Timer Clock Selection JP1 14 2 2 3 Channel Configuration S E or diff JP2 14 2 2 4 External Input or D I O Selection 15 2 2 5 Set pin 19 20 to AGND JP4 PCM 3718HO 16 2 2 6 Enable Disable FIFO Selection JP6 PCM 3718HO only 16 2 2 7 FIFO IRQ Address Selection JP9 PCM 3718HO only 17 2 2 8 D A Range Selection 5 10V JP10 PCM 3718HO only 17 2 2 9 Internal or External D A Reference Voltage JP11 PCM 3718HO eerte teeth Rete die seed navette 17 Connector Pin Assignments sess 18 2 3 Counter Cable esas eI p EI AYGHONE 20 Figure 2 1 Pin Assignment of Counter Cable 20 Table 2 3 Mapping Table for DB9 2 x3 Pin Header Cable 20 Software Installation eese 20 Table of Contents 2 5 Hardware Installation 21 Chapter 3 Signal Connections eese 24 3 1 Analog Output Connection 3718 24 3 2 Analog Input Signal Connections esee 25 3 2 1 Single ended Cha
5. e Ix User Manual this manual x Counter Cable P N 1700001437 PCM 3718HO only Safety Precaution Static Electricity Follow these simple precautions to protect yourself from harm and the products from damage 1 To avoid electrical shock always disconnect the power from your PC chassis before you work on it Don t touch any components on the CPU card or other cards while the PC is on Disconnect power before making any configuration changes The sudden rush of power as you connect a jumper or install a card may damage sen sitive electronic components PCM 3718 Series User Manual iv Chapter 1 1 1 2 1 3 1 4 1 5 1 6 1 7 Chapter 2 1 2 2 2 3 24 Contents 1 General Information eee 2 Introduction e PERF Eri REGE 2 Features iiem DRE EE Ree T 2 SPECICATION oce b tete epe dpt ae Herten 3 1 3 1 Analog Input teneret 3 1 3 2 Analog Output PCM 3718HO only 4 1 3 3 Digital Input and Output 5 1 3 4 Programmable Pacer eer eere etit en 5 1 3 5 General test t AM ee n ee 5 Locating 5 6 Figure 1 1 Connectors Switches and VR Locations 6 ett ete eee pa 8 Software S UppOfL venie Het p 9 Block 10 2 Installafion uei titii L2 Initial Inspection
6. fyour product is diagnosed as defective obtain an RMA return merchandize authorization number from your dealer This allows us to process your return more quickly 4 Carefully pack the defective product a fully completed Repair and Replacement Order Card and a photocopy proof of purchase date such as your sales receipt in a shippable container product returned without proof of the purchase date is not eligible for war ranty service 5 Write the RMA number visibly on the outside of the package and ship it prepaid to your dealer iii Technical Support and Assistance Step 1 Visit the Advantech web site at www advantech com support where you can find the latest information about the product Step 2 Contact your distributor sales representative or Advantech s cus tomer service center for technical support if you need additional assistance Please have the following information ready before you call Product name and serial number Description of your peripheral attachments Description of your software operating system version appli cation software etc complete description of the problem The exact wording of any error messages Packing List Before setting up the system check that the items listed below are included and in good condition If any item does not accord with the table please contact your dealer immediately 1x PCM 3718 series card Companion CD ROM DLL driver included
7. high edge triggers A D conversion to get one sample CNTO OUT Counter 0 Output CNTO CLK Counter 0 Clock PCM 3718 Series User Manual 18 Connector P1 Analog Input Single ended Operation A D SO A D SI A D S2 A D S3 A D S4 A D S5 A D S6 A D S7 A GND A GND Connector P1 Analog Input Differential ended A D HO A D H1 A D H2 A D H3 A D H4 A D H5 A D H6 A D H7 A GND A GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 58 A D S9 A D S10 S11 A D S12 A D S13 A D S14 A D S15 A GND A GND A D LO A D L2 A D L3 A D L4 A D L5 A D L6 A D L7 A GND A GND Connector P2 Digital Input Output DIO 0 DIO 2 DIO 4 DIO 6 DIO 8 DIO 10 DIO 12 DIO 14 D GND 45V Connector P3 Counter Timer PCM 3718HO only PCR TRIG GATE EXT TRIG 1 2 3 4 5 6 19 1 DIO 3 DIO 5 DIO 7 DIO 9 DIO 11 DIO 13 DIO 15 D GND 12V GND CNTO OUT CNTO CLK Chapter 2 2 3 1 Counter Cable PCM 3718 is equipped with a counter function that gives you more flexi bility in data acquisition applications The following shows the pin assignment and the pin definition of the cable PCR TRIG 1 2 GND CNTO GATE 3 4 CNTO OUT EXT TRIG 5 6 CNTO Figure 2 1 Pin Assignment of Counter Cable Table 2 3 Mapping Table for DB9 2 x3 Pin Header Cable DB9 Pin He
8. Accuracy 0 5 1 0 01 of FSR 1 LSB 24 0 02 FSR 1 LSB 8 0 04 of FSR 1 LSB PCM 3718HG Gain Accuracy 0 5 1 0 01 of FSR 1 LSB 5 10 0 02 of FSR 1 LSB 50 100 0 04 of FSR 1 LSB for differential mode 500 1000 0 08 of FSR 1 LSB for differential mode Differential nonlinearity error 1 LSB Input Impedance GW Trigger Mode Software pacer or external trigger External Trigger TTL compatible 1 3 2 Analog Output 3718 only Channels 1 Resolution 12 bit Output Range Internal 0 5 0 10V External 10 10V Accuracy INLE 0 5 LSB monotonic Settling Time 26 us to 1 2 LSB of FSR Gain Error Adjustable to zero Slew Rate 10 V us Drift 40 ppm C Driving Capability 3 mA Max Update Rate 100 k samples s Output Impedance 810 mW min PCM 3718 Series User Manual 4 1 3 3 Digital Input and Output Channels Two 8 bit Level TTL compatible Input Voltage Logic 0 0 8 V max Logic 1 2 0 V min Output Voltage Logic 0 0 33 V max 6 mA sink Logic 1 3 84 V min 6 mA source 1 3 4 Programmable Pacer Device Intel 8254 or equivalent Counters 3 channels 16 bit Counter 1 and Counter 2 are permanently configured as a 32 bit pro grammable pacer Counter 0 is free for your applications PCM 3718HO only Time Base for Counter 1 clock input 10 MHz or 1 MEZ jumper selectable 1 3 5 General Power Consumption 5V pc 180mA Typical 5Vp
9. Address Selection SW1 You control PCM 3718 s operation by reading or writing data to the PC s I O input output port addresses PCM 3718 requires 16 consecutive address locations The switch SWI1 sets the module s base beginning address Valid base addresses range from Hex 000 to Hex 3F0 Other devices in your system can use some of these addresses PCM 3718 s base address was set to Hex 300 at the factory If you need to adjust it to other address ranges set SW1 by referring to table 2 1 Table 2 1 Module I O Addresses SWI Range hex Switch position 1 2 3 4 5 6 000 00F Off Off Off Off Off Off 010 01F Off Off Off Off Off On 200 20F On Off Off Off Off Off 210 24F On Off Off Off Off On 7300 30F On On Off Off Off Off 3F0 default Note Switches 1 6 on SW1 control the PC bus address Table 2 2 PC bus Address Control Switch 1 2 3 4 5 6 Line A9 A8 AT A6 A5 A4 13 Chapter 2 2 2 2 Channel Timer Clock Selection JP1 The PCM 3718 cards support DMA data transfer The bottom pins of JP1 provide selection of DMA channel 1 or 3 as shown in the following fig ure Channel Channel3 default 1M Of 10M 1M D 10M DMA1 o alo DMA1 ojo o DMA3 The upper three pins of JP1 control the input clock frequency for the 8254 programmable clock timer of the module Y
10. D status register BASE 8 PCM 3718 Series User Manual 36 4 9 Control Register BASE 9 Read write register BASE 9 provides information on the PCM 3718 s operating modes BASE 9 Control Bit D7 D6 D5 D4 D3 D2 D1 DO Value INTE 12 1 10 X DMAE 5 1 STO INTE Disable enable PCM 3718 card s interrupt generation 0 Disables the generation of interrupts No interrupt signal will be sent to the PC bus Enables the generation of interrupts If DMAE 0 the PCM 3718 card will generate an inter rupt when it completes an A D conversion Use this set ting for interrupt driven data transfer If DMAE 1 the PCM 3718 card will generate an inter rupt when it receives a T C terminal count signal from the PC s DMA controller indicating that a DMA transfer has been completed Use this setting for DMA data transfer The DMA transfer is stopped by the interrupt caused by the T C signal See DMAE below D to 10 Selects the interrupt level Interrupt level INL2 INL 1 INLO N A 0 0 0 N A 0 0 1 IRQ2 0 1 0 0 1 1 IRQ4 1 0 0 IRQ5 1 0 1 IRQ6 1 1 0 IRQ7 1 1 1 Note Make sure that the IRQ level you choose is not being used by another I O device 39 Chapter 4 DMAE Disable Enable PCM 3718H HG HO DMA transfers 0 Disables DMA transfer 1 Enables transfer Each A D conversion initiates two successive DMA request signals
11. byte Bit 07 06 05 04 D3 D2 D1 DO Value 0107 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIOO BASE 11 read port DIO high byte Bit 07 06 05 04 03 02 01 00 Value DIO15 DIO14 DIO13 DIO12 DIO11 DIO10 DIO9 DIO8 BASE 11 write port DIO high byte Bit D7 D6 D5 04 03 02 01 00 Value DIO15 DIO14 DIO13 DIO12 DIO11 DIO10 DIO9 DIO8 35 Chapter4 4 6 D A Output BASE 04 05H PCM 3718HO only Write only registers BASE 04H and BASE 05H accept data for D A output PCM 3718HO provides one D A output channel with two double buff ered 12 bit multiplying D A converters Write registers at addresses BASE 04H and BASE 05H hold output data DAO is the least signifi cant bit LSB and DA11 is the most significant bit MSB of the D A data Table 4 2 Register for D A Output Data Write D A Output Data Bit 7 6 5 4 3 2 1 0 BASE 04H DA3 DA2 DA1 DAO X X X X BASE 05H DA11 DA10 DA9 DA8 DA7 DA6 DAS DA4 11 DAO Analog to digital data DAO The least significant bit LSB of the D A data 11 The most significant bit MSB When you write data to the D A channels write the low byte first The low byte is temporarily held by a register in the D A and not released to the output After you write the high byte the low byte and high
12. data transfer Get Func 34 s operational status Stop Func 34 Timer initialization Timer interrupt enable Timer interrupt disable Frequency measurement start Get Func 40 s operational status Stop Func 40 Event count start Read event count Stop event count Func 43 Pulse output start Pulse output stop One shot pulse output Time interval measurement start Get Func 49 s status Stop Func 49 Daughterboard A D initialization Perform daughterboard A D conversion with software or interrupt data transfer Get Func 97 s status Stop Func 97 71 AppendixA Func 100 Func 101 Func 105 Func 106 Func 107 Block channel scan initialization Perform Block channel scan with software data transfer Perform Block channel scan with interrupt data transfer Get Func 105 s status Stop Func 105 PCM 3718 Series User Manual 72
13. details please see pages 38 40 The following steps summarize how to use DMA transfer with PCM 3718 cards 1 When you configure your hardware check if any PC DMA channel is available level 1 or level 3 and set the PCM 3718 card s jumper JP1 accordingly 2 Ifyou will be using the PCM 3718 driver for your DMA transfer programming see the Software Drivers User Manual for more infor mation 3 Ifyou choose to conduct your own DMA operation you will need to have a solid understanding of the PC 8237 DMA controller and the chosen PCM 3718 card Make sure you perform the following steps in your DMA transfer Initialize the 8237 DMA controller register and page register b Send DMA enable and trigger source data to the PCM 3718 card s control register located at address 9 c Setan external trigger pulse or pacer trigger rate d Enable the trigger source to start the A D conversion 63 Chapter8 PCM 3718 Series User Manual 64 Calibration Chapter 9 Calibration Regular calibration checks are key factors for accuracy maintenance We provide a calibration program for DOS CALB EXE in the CD ROM shipped with your PCM 3718 card to assist you in this task Path 3718 100 CALB EXE makes calibration easy It leads you through the calibration and setup procedures with a variety of prompts and graphic displays showing you all of the correct settings and adjustments The expl
14. function generator to create the external trigger source The A D conversion starts at the rising edge of the external trigger pulse PCM 3718 Series User Manual 46 5 5 A D Data Transfer You can perform A D data transfer by Program Control Interrupt Rou tine or DMA 1 Program controlled data transfer operates by polling the A D status register After the A D conversion has been triggered your applica tion program checks the INT bit data valid of the A D status regis ter When it detects that the INT bit is on 1 it sends the A D data to the PC s memory using DMA Reset the INT bit by writing to register BASE 8 with any value after you transfer the A D data When you use software triggering you can check either the INT or EOC bits for data validity Since you use the program to trigger the A D conversion you do not need to poll the INT bit to see if the con version has occurred It is easier to use the EOC bit because you do not need to clear it after you transfer the data 2 With interrupt data transfer you write an interrupt routine handler program which transfers data from the module s A D data registers to a previously defined memory segment in the PC At the end of each conversion the EOC signal generates an interrupt and the interrupt handler routine performs the transfer You must specify the interrupt control bit and the interrupt level selection bits in the PCM 3718 s control register BASE 9 before using the
15. input goes to high the counter will start from the initial count You can thus use the gate input to synchronize the counter With this mode the output will remain high until you load the count register You can also synchronize the output by software PCM 3718 Series User Manual 56 MODE 3 Square Wave Generator This mode is similar to Mode 2 except that the output will remain high until one half of the count has been completed for even numbers and will go low for the other half of the count This is accomplished by decreasing the counter by two on the falling edge of each clock pulse When the counter reaches the terminal count the state of the output is changed the counter is reloaded with the full count and the whole process 15 repeated If the count is odd and the output is high the first clock pulse after the count is loaded decrements the count by 1 Subsequent clock pulses dec rement the count by 2 After timeout the output goes low and the full count is reloaded The first clock pulse following the reload decrements the counter by 3 Subsequent clock pulses decrement the count by two until timeout then the whole process is repeated In this way if the count is odd the output will be high for N 1 2 counts and low for N 1 2 counts MODE 4 Software Triggered Strobe After the mode is set the output will be high When the count is loaded the counter will begin counting On terminal count the output will go l
16. interrupt rou tine Writing to the A D status register address BASE 8 resets the PCM 3718 s interrupt request and re enables the PCM 3718 s inter rupt 3 Direct Memory Access DMA Transfer moves the A D data from the PCM 3718 s hardware device to the PC system memory without the system CPU DMA is very useful in high speed data transfers but it is complicated to operate Before the DMA operation you must set the DMA level JP1 the DMA enable bit control register BASE 9 and the registers in the 8237 DMA controller We recom mend that you use the PCM 3718 driver to perform DMA opera tions See Chapter 8 for more Information on the 8237 DMA controller and PCM 3718 operations 47 Chapter 5 5 6 How to Make an A D Conversion To perform A D conversion you can write all I O port instructions directly in your program or you can take advantage of the PCM 3718 driver We suggest that you apply the driver functions in your program This will make your programming job easier and improve the program performance See the User Manual of the software driver for more infor mation Do the following to perform software trigger and program controlled data transfer without the PCM 3718 driver 1 2 3 Set the input range for each A D channel Set the input channel by specifying the MUX scan range Trigger the A D conversion by writing to the A D low byte register BASE 0 with any value Check for the end of the conversion by re
17. range Set the jumper on pin 1 and 3 to make the D A range 0 10 V Set the jumper on pin 3 and 5 to make the D A range 0 5 V JP10 JP 11 gt 2 2 9 Internal or External D A Reference Voltage JP11 PCM 3718HO only JP11 lets users select the D A reference voltage as internal or external Set Jumper on pin 2 and 4 to make the reference voltage internal Set Jumper on pin 4 and 6 to make the reference voltage external 17 Chapter 2 2 3 Connector Pin Assignments PCM 3718 cards have two onboard 20 pin flat cable connectors insula tion displacement mass termination The figure on page 5 shows locations of both connectors while the next page shows pin assignments for P1 P2 and P3 Refer to the table below for descriptions for abbreviations on the pins Abbreviations Description A D S Analog input single ended A D H Analog input high differential A D L Analog input low differential A GND Analog ground DIO Digital input output D GND Digital and power supply ground PCR TRIG Pacer Clock Output This pin pulses once for each pacer clock when turned on If A D conver sion is in the pacer trigger mode this signal can be used as a synchronous signal for other appli cations A low to high edge triggers A D con version to start CNTO Gate Counter 0 Gate EXT TRIG A D External Tirgger This pin is external trigger signal input for the A D conversion A low to
18. the PC 104 connec tor Carefully align the pins with the PC 104 connector Slide the module into the connector The module pins may not slide all the way into the connector do not force the pins into place or the mod ule may be damaged Fasten the module to the CPU card by using the included brass screw Screw the brass spacer into the threaded hole on the CPU card Do not tighten too much or the threads may be damaged Attach any accessories to the PCM 3718 card using 20 pin cables Reinstall the CPU card and replace the system unit cover Reconnect the cables you removed in step 2 Plug in and turn on the power This completes the hardware installation Install the software driver as described in the following section 21 Chapter 2 PCM 3718 Series User Manual 22 Signal Connections This chapter provides information on signal connections for different types data acquisition applications Chapter 3 Signal Connections 3 1 Analog Output Connection PCM 3718HO 3718 provides one D A output channel You can use the internal precision 5 V or 10 V reference to generate 0 to 5 V or 0 to 10 V D A output Use an external reference for other D A output ranges The maxi mum reference input voltage is 10 V and maximum output scaling is 10 V The loading current for D A outputs should not exceed 5 mA Connector P1 provides D A signals Important D A signal connections such as input reference D
19. the start channel to the end channel and then repeat the process For example if the start channel is 3 and the stop channel is 7 then the scan sequence is 3 4 5 6 7 3 4 5 6 7 3 4 BASE 2 write start and stop scan channels Bit 07 06 05 04 D3 D2 D1 DO Value CH3 2 CH1 CL2 CLO CH3 to CHO Stop scan channel number CL3 to CLO Start scan channel number The MUX scan register low nibble CL3 to CLO also acts as a pointer when you program the A D input range see previous section When you set the MUX start channel to N the range code written to the register BASE 1 is for channel Programming example This C code sets the range for channel 5 to 0 625 V OUTPORTB BASE 2 5 SET POINTER TO CHANNEL 5 OUTPORTB BASE 1 3 RANGE CODE FOR 0 625V Note The MUX start stop channel changes each time when you change the input range Do not forget to reset the MUX start and stop channels to the correct values after your range setting PCM 3718 Series User Manual 34 4 5 Digital I O Registers BASE 3 11 The PCM 3718 cards offer two 8 bit digital input output channels These I O channels use the input or output ports at addresses 3 and 11 BASE 3 read port DIO low byte Bit 07 06 05 04 D3 D2 D1 DO Value 0107 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIOO BASE 3 write port DIO low
20. 371833 6th Edition Printed in Taiwan October 2009 PCM 3718 Series User Manual ii Product Warranty 2 years Advantech warrants to you the original purchaser that each of its prod ucts will be free from defects in materials and workmanship for two years from the date of purchase This warranty does not apply to any products which have been repaired or altered by persons other than repair personnel authorized by Advantech or which have been subject to misuse abuse accident or improper instal lation Advantech assumes no liability under the terms of this warranty as consequence of such events Because of Advantech s high quality control standards and rigorous test ing most of our customers never need to use our repair service If an Advantech product is defective it will be repaired or replaced at no charge during the warranty period For out of warranty repairs you will be billed according to the cost of replacement materials service time and freight Please consult your dealer for more details If you think you have a defective product follow these steps 1 Collect all the information about the problem encountered For example CPU speed Advantech products used other hardware and software used etc Note anything abnormal and list any onscreen messages you get when the problem occurs 2 Call your dealer and describe the problem Please have your man ual product and any helpful information readily available 3
21. A INT CN3 CN2 CN1 CNO End of Conversion 0 The A D converter is idle ready for the next conversion Data from the previous conversion is available in the A D data registers 1 The A D converter is busy implying that the A D con version is in progress Single ended differential channel indicator 0 1 8 differential channels 16 single ended channels 37 Chapter4 INT Data valid 0 No A D conversion has been completed since the last time the INT bit was cleared Values in the A D data reg isters are not valid data 1 The A D conversion is completed and converted data is ready If the INTE bit of the control register BASE 9 is set an interrupt signal will be sent to the PC bus through interrupt level IRQn where n is specified by bits I2 I1 and IO of the control register Though the A D sta tus register is read only writing to it with any value clears the INT bit CN3 to CNO When EOC 0 these status bits contain the channel number of the next channel to be converted Remarks If you trigger the A D conversion by the onboard pacer your software should check the INT bit not the EOC bit before it reads the conversion data EOC can equal 0 in two different situations the conversion is completed or no conversion has been started Your software should therefore wait for the signal INT 1 before it reads the conversion data It should then clear the INT bit by writing any value to the A
22. A outputs and analog ground appear below P1 20 D A Ref In 1 1 19 D A Out AP JP11 P1 17 18 A GND On Board Ref 5V JP10 10V PCM 3718 Series User Manual 24 3 2 Analog Input Signal Connections The PCM 3718 cards support either 16 single ended or eight differential analog inputs Jumper JP3 selects the input channel configuration See 2 2 3 The major difference between single ended and differential input connections is the number of signal wires per input channel 3 2 1 Single ended Channel Connections Single ended connections use only one signal wire per channel The volt age on the line refers to the common ground on the card signal source without a local ground is called a floating source It is fairly simple to connect a signal ended channel to a floating signal source A standard wiring diagram looks like this Signal Input As ToAD A GND A GND 3 2 2 Differential Channel Connection The differential input configuration uses two signal wires per channel The card measures the voltage difference between these two wires the HIGH wire and the LOW wire If the signal source has no connection to local ground it is called a floating source A connection must exist between LOW and ground to define a common reference point for float ing signal sources To measure a floating source connect the input chan nel as shown below
23. ASE 1 write only A D range control code Bit 07 06 05 04 D3 D2 D1 DO Value N A N A N A N A G3 G2 G1 GO PCM 3718H and PCM 3718HO range code Input Range V Unipolar Range Code Bipolar 2 G1 GO 5 0 0 0 0 22 5 0 0 0 1 1 25 B 0 0 1 0 0 625 0 0 1 1 0 to 10 U 0 1 0 0 0to05 U 0 1 0 1 0 to 2 5 U 0 1 1 0 0 to 1 25 U 0 1 1 1 10 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 PCM 3718 Series User Manual 32 PCM 3718HG range code Input Range V Unipolar Range Code Bipolar G3 G2 G1 GO 25 0 0 0 0 0 5 0 0 0 1 0 05 0 0 1 0 0 005 0 0 1 1 0 to 10 U 0 1 0 0 0 to 1 U 0 1 0 1 0 to 0 1 U 0 1 1 0 0 to 0 01 U 0 1 1 1 10 1 0 0 0 1 1 0 0 1 20 1 1 0 1 0 20 01 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 33 Chapter4 4 4 MUX Scan Register BASE 2 Read write register BASE 2 controls multiplexer MUX scanning The high nibble provides the stop scan channel number and the low nibble provides the start scan channel number The MUX initializes automatically to the start channel when you write to this register Each A D trigger sets the MUX to the next channel With continuous triggering the MUX will scan from
24. BASE 7 is the base address plus seven bytes If the card s base address is 300h the register s address is 307h The following sections give detailed information on the layout and function of each of the card s registers I O Port Address Map The following table shows the function of each register or driver and its address relative to the base address of the module Table 4 1 I O Port Address Assignments Address Read Write BASE 0 A D low byte amp channel Software A D trigger BASE 1 A D high byte A D range control BASE 2 MUX scan MUX scan channel amp range control pointer BASE 3 DIO low byte DIO 0 7 DIO low byte DIO 0 7 BASE 4 N A D A output data PCM 3718HO only BASE 5 N A D A output data PCM 3718HO only BASE 6 N A FIFO interrupt control PCM 3718HO only BASE 7 N A N A BASE 8 Status Clear interrupt request BASE 9 Control Control BASE 10 N A Counter enable BASE 11 DIO high byte DIO 8 15 DIO high byte DIO 8 15 BASE 12 Counter 0 Counter 0 BASE 13 Counter 1 Counter 1 BASE 14 Counter 2 Counter 2 BASE 15 N A Counter control BASE 17 N A A D data and channels from FIFO PCM 3718HO only BASE 18 A D data and channels from FIFO N A PCM 3718HO only BASE 19 FIFO status FIFO clear PCM 3718HO only PCM 3718 Series User Manual 30 4 1 A D Data Registers BASE 0 1 Two read only registers at BASE 0 and BASE 1 h
25. C Cold Junction Com pensation circuit which lets you directly measure thermocouples You can handle all types of thermocouples with software compensation and linearization Special circuit pads on the PCLD 8115 accommodate passive signal con tioning components You can easily implement a low pass filter attenua tor or current shunt by adding resistors and capacitors 27 Chapter 3 3 4 Digital Signal Connections The PCM 3718 cards have two 8 bit digital input output channels The digital I O levels are TTL compatible The following figure shows con nections of digital signals with other TTL devices TTL Devices gt s o S or D GND D GND O O j mE To receive an OPEN SHORT signal from a switch or relay add a pull up resistor to ensure that the input is held at a high level when the contacts are open See the figure below 470 ohm PCM 3718 Series User Manual 28 Register Structure and Format This chapter gives detailed information on the layout and function of each of the card s registers Chapter 4 Register Structure and Format The key to programming the PCM 3718 cards is to understand the func tion of the 16 registers The PCM 3718 cards require 19 consecutive addresses in the PC s I O space Each address corresponds to card regis ter The address of each register is specified as an offset from the card s base address For example BASE 0 is the card s base address and
26. DIO 2 This is the default setting of JP3 Digital I O Line DIO 0 and DIO 2 default Pin 1 can also be set to external A D trigger source EXT and pin 2 can be connected to counter gate 0 GO External trigger input amp counter gate 0 Note When the jumper setting is set to GO the func tionality is the same as CNTO GATE of P3 When the jumper setting is set to EXT the func tionality is the same as EXT TRIG of P3 15 Chapter 2 2 2 5 Set P1 pin 19 20 to AGND JP4 PCM 3718HO You can use pin19 and pin20 on connector P1 for connection to AGND or D A output Pin19 is used to set AGND or D A output 1 3 5 Pin20 is used to set AGND or D A voltage reference 2 4 6 Pin19 and Pin20 will be set to AGND Pin19 will be set to D A output Pin20 will be set to D A reference 2 2 6 Enable Disable FIFO Selection JP6 PCM 3718HO only You can use JP6 to enable or disable the FIFO function Set jumper on pin 1 2 to enable FIFO As shown below Set jumper on pin 2 3 to disable FIFO 1 2 3718 Series User Manual 16 2 2 7 FIFO IRQ Address Selection JP9 PCM 3718HO only You can set the FIFO IRQ address with JP9 120 1 FRO 1009 9 Be OO 7 ERO OO 5 IQ OO 2 OO 1 CROX 2 2 8 D A Range Selection 5 10V JP10 PCM 3718HO only JP10 lets users select the D A output
27. Daughterboards We offer a wide variety of optional daughterboards to help you get the most from your PCM 3718 card You will need the PCLD 780 or PCLD 880 Screw terminal Board or the PCLD 8115 Wiring Terminal Board to make connections PCLD 789D Amplifier Multiplexer Board This analog input signal conditioning board multiplexes 16 differential inputs to one A D input channel A high grade instrumentation amplifier provides switch selectable gains of 1 2 10 50 100 200 or 1000 PCLD 788 Relay Multiplexer Board This board multiplexes up to 16 differential inputs to one analog output channel It offers isolated break before make high voltage switching and a CJC circuit for thermocouple measurement PCLD 786 SSR I O Module Carrier Board This board holds eight opto isolated solid state relay modules and provides an additional eight outputs to drive external applications PCLD 785B and PCLD 885 Relay Output Boards These boards let you control relays through the PCM 3718 s 16 bit digi tal output channels PCLD 785B provides 24 SPDT relays while the PCLD 885 provides 16 SPDT power relays PCLD 782B Isolated D I Board This board provides 24 opto isolated digital inputs for connecting to PCM 3718 s digital input channels PCM 3718 Series User Manual 8 1 6 Software Support The PCM 3718 Series comes with a powerful and easy to use software driver This driver makes application programming much easier espe cially when you us
28. Error Message Get Driver Version Number Driver Initialization A D Initialization Perform A D conversion with software data transfer Perform A D conversion with DMA data transfer Get Func 6 s operational status Stop Func 6 Perform A D conversion with interrupt data transfer Get Func 9 s operational status Stop Func 9 D A Initialization PCM 3718HO only Perform D A conversion with software data transfer PCM 3718HO only Perform D A conversion with DMA data transfer Get Func 14 s operational status Stop Func 14 Perform D A conversion with interrupt data transfer Get Func 17 s operational status Stop Func 17 DAI Initialization Perform digital input with software data transfer Perform digital input with DMA data transfer Get Func 22 s operational status Stop Func 22 PCM 3718 Series User Manual 70 Func 25 Func 26 Func 27 Func 28 Func 29 Func 30 Func 31 Func 32 Func 33 Func 34 Func 35 Func 36 Func 37 Func 38 Func 39 Func 40 Func 41 Func 42 Func 43 Func 44 Func 45 Func 46 Func 47 Func 48 Func 49 Func 50 Func 51 Func 96 Func 97 Func 98 Func 99 Perform digital input with interrupt data transfer Get Func 25 s operational status Stop Func 25 D O Initialization Perform digital output with software data transfer Read back current digital output status Perform digital output with DMA data transfer Get Func 31 s operational status Stop Func 31 Perform digital output with interrupt
29. Hz as set by jumper JP1 The following steps tell you how to set the counter modes and constants 1 Set Counter 1 to Mode 3 by writing 76h to address BASE 15 2 Set Counter 1 s divisor constant by writing to BASE 13 Con stant C1 can be any 16 bit value from 2 to 65535 Because the 8254 has 8 bit registers you should first write the low byte of C1 to BASE 13 then write the high byte of to BASE 13 3 Set Counter 2 to Mode 3 by writing B6h to address BASE 15 4 Set Counter 2 s divisor constant C2 by writing to BASE 14 Con stant C2 can be any 16 bit value from 2 to 65535 Because the 8254 has 8 bit registers you should first write the low byte of C2 to BASE 14 then write the high byte of C2 to BASE 14 59 Chapter 7 Programming example The following program written in C sets the pacer rate to 25 kHz It uses FCLK of 10 MHz C1 of 40 and C2 of 10 Then 25 kHz 10 MHZ 40 10 OUTPORTB BASE 3 0x76 SET COUNTER 1 TO MODE 3 OUTPORTB BASE 1 40 WRITE LOW BYTE OF CI1 OUTPORTB BASE 1 0 WRITE HIGH BYTE OF C1 OUTPORTB BASE 3 OxB6 SET COUNTER 2 TO MODE 3 OUTPORTB BASE 2 10 WRITE LOW BYTE OF C2 OUTPORTB BASE 2 0 WRITE HIGH BYTE OF C2 PCM 3718 Series User Manual 60 tc LLI A lt T O 8 Operation Chapter 8 Operation Direct Memory Access improves system performance by allowing exter nal devices to transfer information dire
30. O Status 42 4 14 FIFO Clear BASE419H eese nee 42 Table 4 6 Register for FIFO Clear 42 Chapter 5 A D Conversion eeeeeeeeeeee eee 44 5 1 A D Data Format and Status Register 44 5 2 Input Range Selection eterne 45 PCM 3718 Series User Manual vi 53 54 5 5 5 6 Chapter Chapter 7 1 72 7 3 74 7 5 Chapter 8 1 8 2 Chapter 9 1 9 2 MUX CIERRE See 45 Trigger Mode tete e pt ep hens 46 Data Transfer eee 47 How to Make an A D Conversion eee 48 6 Digital Input Output 50 7 Programmable 52 E8254 actione e iir 52 Counter Read write and Control Register 53 Counter Operating Modes 56 Counter Operations eet etie prep ees 58 Counter Applications sese 59 8 DMA Operation ceeeeee eere eee ee ees 62 Introduction to the 8237 DMA 62 Using DMA Transfer with PCM 3718 Cards 63 9 Calibration cese niei cecnccsnacosnsibasessecne OO Assigninent iuo iode detti tete stirpes 66 D A A D Calibration 67 9 2 1 D A Calibration Procedure
31. R6 until the D A volt age is exactly 0 V and 5 V Connect pin19 as the external DC voltage source to pinl if the A D channel is going to be calibrated 9 2 2 A D Calibration Procedures Connect an external DC voltage source with value of 0 5 LSB to A D Channel 0 pin 1 on connector P1 1 Adjust VR2 until the output from the card s A D converter flickers between 0 and 1 Connect an external DC voltage source with a value of 4094 5 LSB to A D channel 0 Adjust 1 until the A D reading flickers between 4094 and 4095 Repeat steps 2 to step4 adjusting VR1 and VR2 Select unipolar input configuration Connect an external DC volt age source with a value of 6 0 5 LSB to A D channel 0 Adjust VR3 until the reading of the A D flickers between 0 and 1 67 Chapter 9 PCM 3718 Series User Manual 66 APPENDIX Software Driver User Note Appendix A Software Driver User Note PCM 3718 cards are supported by a powerful software utility provided by Advantech The lists below shows the functions supported by the PCM 3718 Series i e the items with the mark are supported For complete function descriptions of the software utility please refer to the PC LabCard software Utility User Manual Func 0 Func 2 Func 3 Func 4 Func 5 Func 6 Func 7 Func 8 Func 9 Func 10 Func 11 Func 12 Func 13 Func 14 Func 15 Func 16 Func 17 Func 18 Func 19 Func 20 Func 21 Func 22 Func 23 Func 24 Get
32. Since the 8254 counter uses a 16 bit structure each section of read write data is split into a least significant byte LSB and most significant byte MSB To avoid errors it is important that you make read write opera tions in pairs and keep track of the byte order The data format for the control register appears below BASE 15 8254 control standard mode Bit D7 D6 D5 D4 D3 D2 D1 DO Value SC1 SCO RW1 RWO M2 M1 MO BCD SC1 amp SCO Select counter Counter SC1 SCO 0 0 0 1 0 1 2 1 0 Read back command 1 1 53 Chapter 7 RW1 amp RWO Select read write operation Operation RW1 RWO Counter latch 0 0 Read write LSB 0 1 Read write MSB 1 0 Read write LSB first then MSB 1 1 M2 MI amp Select operating mode M2 M1 MO Mode Description 0 0 0 0 Programmable one shot 0 0 1 1 Programmable one shot X 1 0 2 Rate generator X 1 1 3 Square wave rate generator 1 0 0 4 Software triggered strobe 1 0 1 5 Hardware triggered strobe BCD Select binary or BCD counting BCD Type 0 Binary counting 16 bits Binary coded decimal BCD counting If you set the module for binary counting the count can be any number from 0 up to 65535 If you set it for BCD Binary Coded Decimal count ing the count can be any number from 0 to 9999 If you set both SC1 and SCO bits to 1 th
33. These signals cause the 8237 DMA controller to transfer two bytes of conversion data from the PCM 3718 card to memory Note You must program the PC s 8237 DMA controller as the DMA page register before you set DMAE 101 ST1 to STO Trigger source Trigger Source ST1 STO Software trigger 0 X External trigger 1 0 Pacer trigger 1 1 4 10 Pacer Enable Register BASE 10 Register BASE 10 enables or disables the PCM 3718 s pacer TCO Disable enable pacer 0 Pacer enabled 1 Pacer disabled 4 11 Programmable Pacer Reg BASE 12 13 14 15 These four registers located at addresses BASE 12 BASE 13 BASE 14 and BASE 15 are used for the Intel 8254 programmable pacer Please refer to Chapter 7 Programmable Pacer or 8254 product literature for detailed application information PCM 3718 Series User Manual 40 4 12 A D data and channel from FIFO BASE 17 18H PCM 3718HO only The PCM 3718 cards store data from A D conversions in a 1 K word First In First Out FIFO data buffer Registers at 17 and BASE 18H store the channel number data The register at BASE 19H clears the FIFO buffer and sets its empty flag EF Table 4 4 Register for A D Data and Channel from FIFO Read A D data and channels from FIFO Bit 7 6 5 4 3 2 1 0 BASE 17H AD3 AD2 01 C2 C1 CO BASE 18H AD11 AD10 AD9 AD8 AD7 AD6 AD5 AD4 ADO Analo
34. able pacer trig ger and external pulse trigger Data transfer by program control interrupt handler routine or DMA 1k FIFO on AI PCM 3718HO 12 bit D A Converter PCM 3718HO 16 bit programmable counter timer PCM 3718 Series User Manual 2 1 3 Specifications 1 3 1 Analog Input Channels 16 single ended or 8 differential jumper selectable Resolution 12 bits FIFO 1k PCM 3718HO only Input Range software programmable VDC PCM 3718H and PCM 3718HO Bipolar 10 5 2 5 1 25 0 625 Unipolar 0 10 0 5 0 2 5 0 1 25 PCM 3718HG Bipolar 10 5 1 0 5 0 1 0 05 0 01 0 005 Unipolar 0 10 0 1 0 0 1 0 0 01 Max Sampling Rate 100 KHz DMA transfer 80 kHz on P4 based or upper system The DMA mode AI sampling can only be operated on the ISA bus of P3 motherboard For platforms that are using mother board or above the DMA mode AI sampling of Advantech s ISA cards may decrease or not work at all P3 Pentium III microprocessor from Intel P4 z Pentium IV microprocessor from Intel We recommend the customer use Intel P3 installed PC to work with Advantech s ISA cards for high speed DMA AI sampling Maximum Data Throughput PCM 3718H and PCM 3718HO 100 kHz PCM 3718HG variable depending on PGIA settling time Gain Speed 0 5 1 100 kHz 5 10 35 kHz 50 100 7 kHz 500 1000 770 Hz 3 Chapter 1 Accuracy depending on gain values PCM 3718H and PCM 3718HO Gain
35. ader 1 PCR TRIG 1 PCR TRIG 2 GND 2 GND 3 CNTO GATE 3 CNTO GATE 4 CNTO OUT 4 CNTO OUT 5 EXT TRIG 5 EXT TRIG 6 CNTO CLK 6 CNTO CLK 7 Disconnect 8 Disconnect gt 9 Disconnect 2 4 Software Installation The PCM 3718 cards include a CD ROM with utility software The CD ROM contains 1 Acomprehensive I O driver for A D D A and digital I O applica tions This driver lets you use standard functions written in com mon programming languages to operate the PCM 3718 card You do not need to perform complex register programming The driver supports the following languages Microsoft Visual Basic Visual Borland C C Builder and Delphi Please refer to the Software Driver s User Manual for more information 2 Demonstration programs 3 Acalibration program 4 A test program PCM 3718 Series User Manual 20 2 5 Hardware Installation Warning TURN OFF your PC power supply whenever you install or remove the PCM 3718H 3718HG or connect and disconnect cables Installing the module 1 Turn the PC s power off Turn off the power any peripheral devices such as printers and monitors Disconnect the power cord and any other cables from the back of the computer Remove the system unit cover see the user s guide for your chassis if necessary Remove the CPU card from the chassis if necessary to gain access to the card s PC 104 connector Connect connector J1 of the PCM 3718 card to
36. ading the A D status regis ter BASE 8 INT bit Read data from the A D converter by reading the A D data registers BASE 0 and BASE 1 Convert the binary A D data to an integer PCM 3718 Series User Manual 48 tc LLI A lt T O 6 Digital Input Output Chapter 6 Digital Input Output The PCM 3718 cards provide two 8 bit digital input output channels The registers at addresses BASE 3 and BASE 11 can input or latch out put data Data format for each register appears as below BASE 3 read port DIO low byte Bit D7 D6 D5 D4 D3 D2 D1 DO Value 0107 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1 DIOO BASE 3 write port DIO low byte Bit D7 D6 D5 D4 D3 D2 D1 DO Value 0107 0106 DIO5 DIO4 DIO3 DIO2 DIO1 DIOO BASE 11 read port DIO high byte Bit D7 D6 D5 D4 D3 D2 D1 DO Value DIO15 DIO14 DIO13 DIO12 DIO11 DIO10 DIO9 DIO8 BASE 11 wirte port DIO high byte Bit D7 D6 D5 D4 D3 D2 D1 DO Value DIO15 DIO14 DIO13 DIO12 DIO11 DIO10 DIO9 DIO8 Using the PCM 3718 s input and output functions is fairly straightfor ward Page 23 shows some ideas for digital signal connections PCM 3718 Series User Manual 50 Chapter 7 Programmable 7 1 The Intel 8254 The PCM 3718 cards use the Intel 8254 programmable interval time
37. anatory material in this section is brief intended for use in conjunction with the calibration program To perform a satisfactory calibration you need 4 2 digit digital multim eter and a voltage calibrator or a stable noise free D C voltage source 9 1 VR Assignment The five variable resistors VRs on the PCM 3718 board help you make accurate adjustments on all A D See the figure on page 5 for the VR locations on the board The following list shows the function of each VR VR Function VR1 A D full scale adjustment VR2 A D bipolar offset VR3 A D unipolar offset VR4 High Gain Calibration offset only for PCM 3718HG VR5 D A full scale adjustment only for PCM 3718HO VR6 D A offset only for PCM 3718HO PCM 3718 Series User Manual 66 9 2 D A A D Calibration Regular and accurate calibration procedures ensure maximal accuracy The CALB EXE calibration program leads you through D A and A D off set and gain adjustment procedure The basic steps are outlined below 9 2 1 D A Calibration Procedure Please prepare a multimeter before you implement the D A calibration Connect it to D A output pin19 on connector P1 D A calibration procedures PCM 3718HO only 1 Press Down button to select the code to 0 and adjust VR6 until the D A voltage is Press Up button to set the code to 4095 and adjust 5 until the D A voltage is 5V Repeat step and step2 adjusting VR5 and V
38. and jumper settings Chapter 2 Installation 2 1 Initial Inspection cards in the PCM 3718 Series are carefully inspected mechanically and electrically before shipment It should be free of marks and scratches and in perfect order when received As you unpack the PCM 3718 card check for signs of shipping damages damaged box scratches dents etc If it is damaged or fails to meet specifications notify our service department or your local sales representative immediately We will then make arrangement to repair or replace the unit for you Discharge any static electricity on your body before touching the board by touching the back of the system unit grounded metal Also keep from materials of static electricity such as plastic vinyl and styrofoam Remove the PCM 3718 card from its protective packaging by grasping the rear metal panel Handle the module only by its edges to avoid static electricity which could damage its integrated circuits Keep the anti static packaging material for storage and protection when you have to remove the module from its connector PCM 3718 Series User Manual 12 2 2 Switch Jumper Settings Ease of use was a primary design goal when we designed the PCM 3718 Series This module has one function switch and seven jumper settings The following sections tell you how to configure the module You may want to refer to the figure on page 5 to easier locate the jumpers and switches 2 2 1 Base
39. byte are added and passed to the D A converter This double buffering process protects the D A data integrity through a single step update 3718 provides a precise fixed internal 5 V or 10 V reference selectable by means of jumper JP10 This reference voltage is available at connector P1 pin 20 If you use this voltage as the D A reference input the D A output range is either 0 to 5 V or 0 to 10 V You can also use an external DC or AC source as the D A reference input In this case the maximum reference input voltage is 10 V and the maximum D A out put ranges are 0 to 10 V or 0 to 10 V Connector P1 supports all D A signal connections Chapter 2 shows con nector pin assignments while chapter 3 has a wiring diagram for D A sig nal connections PCM 3718 Series User Manual 36 4 7 Interrupt Control PCM 3718HO only Table 4 3 Register for FIFO Interrupt Control Write FIFO interrupt control Bit 7 16 5 4 3 2 1 0 BASE 06H X X X X X X X FINT FINT Enables disables FIFO interrupt FIFO interrupt disabled FIFO interrupt enabled 0 1 4 8 A D Status Register BASE 8 Read only register BASE 8 provides information on the A D configura tion and operation Writing to this I O port with any data value clears its INT bit The other data bits do not change BASE 8 A D status Bit D7 D6 D5 04 03 02 01 DO Value EOC N
40. c 400mA Max Digital I O Connector 20 pin post headers for I O connection Analog Input Connector 20 pin post headers for I O connection Operating Temperature 0 60 C refer to 68 2 1 2 Storage Temperature 20 70 C Operating Humidity 5 to 95 non condensing refer to 68 2 3 MTBF Over 235 346 hrs 25 C grounded fixed environment 5 Chapter 1 4 Locating Components VR2 VR3 VRS DJP11 1 H Figure 1 1 Connectors Switches and VR Locations PCM 3718 Series User Manual 6 Label Function J1 PC bus connector J2 Reserved PCM 3718HO only JP1 DMA level 1 or 3 and time base 1MHz or 10MHz JP2 Differential or single ended inputs JP3 DIOO or external input JP4 Set P1 pin 19 20 to AGND or D A pin use PCM 3718HO only JP6 FIFO enable disable selection PCM 3718HO only JP9 FIFO IRQ address selection PCM 3718HO only JP10 D A range select selection 5 or 10V PCM 3718HO only JP11 D A reference voltage as internal or external PCM 3718HO only P1 Analog input P2 Digital input output connector P3 Counter PCM 3718HO only SW1 Base address A D full scale VR2 A D bipolar offset VR3 A D unipolar offset PGA offset PCM 3718HG only VR5 D A full scale adjustment PCM 3718HO only VR6 D A offset PCM 3718HO only 7 Chapter 1 5
41. ctly to or from the PC s memory without using the CPU PCM 3718 s DMA capability significantly improves the system performance in high speed A D applications 8 1 Introduction to the 8237 DMA Controller The 8237 DMA controller chip on the PC system board handles the DMA operation This chip has four prioritized direct memory access channels Channel 0 is reserved by the PC system to refresh its dynamic RAM Channel 2 supports floppy disk operations Channel 3 is generally used for hard disk operations Channel 1 is not for any internal operations and 15 reserved for your applications Each channel has two associated control signals The DMA Request Sig nal DRQ triggers a DMA operation and the DMA Acknowledge Signal DACK authorizes the 8237 to start the data transfer The 8237 DMA chip has four operating modes single demand block and cascade and four control registers These registers are 1 Operation mode register set mode of operation 2 Address register specify memory segment starting address 3 Word count register specify the number of transfers 4 Initialization register enable and disable DMA channels You must properly set all four registers before requesting the DMA operation PCM 3718 Series User Manual 62 8 2 Using Transfer with PCM 3718 Cards A DMA transfer is a powerful but complicated operation Related descriptions of the DMA transfer have been covered in other paragraphs of this manual for
42. e 0 After you load the count into the selected count register the output will remain low and the counter will count When the counter reaches the terminal count its out put will go high and remain high until you reload it with the mode or a new count value The counter continues to decrement after it reaches the terminal count Rewriting a counter register during counting has the fol lowing results 1 Writing to the first byte stops the current counting 2 Writing to the second byte starts the new count MODE 1 Programmable One shot The output is initially high The output will go low on the count follow ing the rising edge of the gate input It will then go high on the terminal count If you load a new count value while the output is low the new value will not affect the duration of the one shot pulse until the succeed ing trigger You can read the current count at any time without affecting the one shot pulse The one shot is retriggerable thus the output will remain low for the full count after any rising edge at the gate input MODE 2 Rate Generator The output will be low for one period of the input clock The period from one output pulse to the next equals the number of input counts in the counter register If you reload the counter register between output pulses the present period will not be affected but the subsequent period will reflect the value The gate input when low will force the output high When the gate
43. e 8 bit reg ister will not accommodate all the data The PCM 3718 cards therefore store A D data in two registers located at addresses BASE 0 and BASE 1 The A D low byte data is stored in bits D4 to D7 ADO to AD3 of and high byte data is stored in bits DO to D7 AD4 to AD11 of BASE 1 The least significant bit is ADO and the most significant bit is ADII You can read the source channel number corresponding to the A D data from bits DO to D3 CO to C3 of BASE 0 A D data register format is BASE 0 read only A D low byte amp channel number Bit 07 06 05 04 D2 D1 DO Value AD3 AD2 AD1 ADO C2 C1 CO BASE 1 read only A D high byte Bit 07 06 05 04 D3 D2 D1 DO Value AD11 AD10 9 ADB AD7 AD6 AD5 AD4 The A D status register at BASE 8 read only gives information on A D configuration and operation A D status register format is BASE 8 A D status Bit D7 D6 D5 D4 D3 D2 D1 DO Value EOC N A MUX INT CN3 CN2 CN1 CNO Bits in this register indicate the end of conversion status single ended differential input interrupt status and the number of the channel to be converted next Refer to page 33 A D Status Register for more information PCM 3718 Series User Manual 44 5 2 Input Range Selection Each A D channel has its own individual input ran
44. e counter control register is in read back command mode The control register data format becomes BASE 15 8254 control read back mode Bit D7 D6 D5 D4 D3 D2 D1 DO Value 1 1 CNT STA C2 C1 CO X PCM 3718 Series User Manual 54 CNT 0 STA 0 C2 C1 amp C0 Latch count of selected counter s Latch status of selected counter s Select counter for a read back operation C2 1 select Counter 2 1 select Counter 1 CO 1 select Counter 0 If you set both and SCO to 1 and STA to 0 the register selected by C2 to contains a byte which shows the status of the counter The data format of the counter read write register then becomes BASE 12 13 14 status read back mode Bit D7 D6 D5 D4 D3 D2 D1 DO Value OUT NC RW1 M2 M1 Mo BCD OUT Current status of counter output NC Null count is 1 when the last count written to the counter register has been loaded into the counting element The pacer enable register located at address BASE 10 has a close rela tionship with the counter operation Refer to pages 32 33 Pacer Enable Register for the register data format The TCO bit enables and disables the pacer If TCO is 0 the pacer is enabled If TCO is 1 the pacer is dis abled 55 Chapter 7 7 3 Counter Operating Modes MODE 0 Stop on Terminal Count The output will be initially low when you set mod
45. e sophisticated features like interrupt or DMA data transfer For creating a high performance Human Machine Interface you may need other supporting software beside our included driver for the PCM 3718 cards Please consult your Advantech representative for appropriate software packages Some suggestions are listed below ADAQView ADAQView is a Windows based data acquisition control analysis and presentation development software package In addition to typical Human Machine Interface HMI functions ADAQView features Visual Basic programming environment and it provides numerous graph ical control and display icons to assist you in developing HMIs ActiveDAQ ActiveDAQ is a collection of add on ActiveX controls which provides an easy to use property sheet interface for configuring analog digital input output counter frequency high speed data acquisition and controls You can use ActiveX control in Visual Basic Delphi and Visual C develop ment environments for Windows 98 2000 XP LabVIEW Driver The Advantech LabVIEW driver supports National Instruments Lab VIEW 7 1 and runs in Microsoft Windows 98 2000 XP 9 Chapter 1 7 Block Diagram PCM 3718H HG HO CNTO OUT Digital Output Ext Trig Analog Input Note CNTO OUT is only for PCM 3718HO PCM 3718 Series User Manual 10 Installation This chapter explains how to install PCM 3718 cards and how to configure its switch
46. g to digital data ADO the least significant bit LSB of the A D data AD11 the most significant bit MSB C3 C0 A D channel number from which the data is derived the least significant bit LSB of the channels C3 the most significant bit MSB 41 Chapter4 4 13 FIFO status BASE 19H PCM 3718HO only The register at BASE 19H clears the FIFO buffer and sets its empty flag EF The FIFO status register address BASE 19H has flags which you can read to determine the current state of the FIFO buffer including full flag half full flag and empty flag Table 4 5 Register for FIFO Status Read FIFO status Bit 7 6 5 4 3 2 1 0 BASE 19H FF HF EF EF FIFO empty flag 1 FIFO is empty 0 FIFO is not empty HF FIFO half full flag 1 FIFO is half full or more than half full 0 FIFO is less than half full FF FIFO full flag 1 FIFO is full 0 FIFO is not full 4 14 FIFO Clear BASE 19H Writing any value to BASE 19H clears all data in the FIFO and sets the empty flag EF to 1 Table 4 6 Register for FIFO Clear Write FIFO clear Bit 7 6 5 4 3 2 1 0 BASE 19H X x X X X X X PCM 3716 Series User Manual 42 A D Conversion This chapter explains how to use the PCM 3718 series A D conversion functions Chapter 5 A D Conversion 5 1 A D Data Format and Status Register Since the PCM 3718 cards use 12 bit A D conversions a singl
47. ge controlled by a range code stored in the onboard RAM Please refer to pages 28 and 29 on A D Range Control for more information 5 3 MUX Setting PCM 3718 cards offer 16 single ended or eight differential analog input channels Set jumper JP2 for the channel configuration before you set the multiplexer scan range The MUX scan register specifies the high and low limits of the scan range The MUX scan register is a read write register at address BASE 2 Bits DO to D3 hold the starting channel number and positions D4 to D7 hold the stop scan channel number When you set the PCM 3718 card for eight differential input channels set bits CH3 and CL3 to zero The MUX scan register data format is as below BASE 2 write start and stop scan channels Bit 07 06 05 04 D3 D2 D1 DO Value CH3 2 CH1 CL2 CLO If you require only one A D input channel you should set the high and low scan limits to the same value If you specify a range of input chan nels PCM 3718 automatically performs an A D conversion on each channel in the range beginning with the start channel When it reaches the stop channel it loops back to the start channel and continues This looping continues until the specified number of conversions is completed Note that writing to the MUX automatically resets to the start channel You can specify channel settings by writing directly to the MUX scan register U
48. gister Format is as shown at the beginning of the chapter The read back command can latch multiple counter output latches Sim ply set the CNT bit to O and select the desired counter s This single command is functionally equivalent to multiple counter latch commands one for each counter latched The read back command can also latch status information for selected counter s by setting the STA bit to 0 The status must be latched to be read the status of a counter is accessed by a read from that counter For the counter status format please see the beginning of the chapter Counter Latch Operation The 8254 supports the counter latch operation in two ways The first way is to set bits RW1 and RWO to 0 This setting latches the count of the selected counter in a 16 bit hold register The second way is to perform a latch operation under the read back command Set bits SC1 and SCO to 1 and CNT to 0 The latter method has the advantage of operating several counters at the same time A subsequent read operation on the selected counter will retrieve the latched value PCM 3718 Series User Manual 56 7 5 Counter Applications The 8254 programmable Interval timer counter on your PCM 3718 inter face module is a very useful device You can program counters 1 and 2 as pacers to generate A D conversion trigger pulses Setting the Pacer Rate The following equation gives the pacer rate Pacer rate FCLK C1 C2 FCLK is either 1 MHz or 10 M
49. nnel Connections sss 25 3 2 2 Differential Channel Connection sees 25 3 3 Expanding Analog Inputs esee 27 3 4 Digital Signal 28 Chapter 4 Register Structure and Format 30 Table 4 1 Port Address Assignments 30 41 A D Data Registers BASE 0 1 esee 31 4 2 Software A D Trigger BASE 0 sese 31 4 3 A D Range Control 32 44 Scan Register BASE42 esee 34 4 5 Digital I O Registers BASE 3 11 sese 35 4 6 D A Output BASE 04 05H PCM 3718HO only 36 Table 4 2 Register for D A Output Data 36 4 7 FIFO Interrupt Control PCM 3718HO only 37 Table 4 3 Register for FIFO Interrupt Control 37 4 8 A D Status Register 8 sse 37 4 9 Control Register 5 39 4 10 Pacer Enable Register BASE 10 esses 40 4 11 Programmable Pacer Reg BASE 12 13 14 15 40 4 12 A D data and channel from FIFO BASE 17 18 PCM 3718HO eite 41 Table 4 4 Register for A D Data and Channel from FIFO 41 4 13 FIFO status BASE 19H 3718 only 42 Table 4 5 Register for FIF
50. old A D conversion data The 12 bits of data from the A D conversion are stored in 1 bit 7 to bit 0 and BASE 0 bit 7 to bit 4 BASE 0 bits 3 to 0 store the source A D channel number BASE 0 read only A D low byte amp channel number Bit 07 06 05 04 D3 D2 D1 DO Value AD3 AD2 AD1 ADO C2 C1 CO BASE 1 read only A D high byte Bit 07 06 05 04 D3 D2 D1 DO Value AD11 AD10 AD9 ADB AD7 AD6 AD5 AD4 ADII to ADO Analog to digital data ADO is the least significant bit LSB of the A D data and AD11 is the most significant bit MSB to CO A D channel number from which the data is derived C3 1s the MSB and CO is the LSB 4 2 Software A D Trigger BASE 0 You can trigger an A D conversion from software the module s onboard pacer or from an external pulse Bits 1 and 0 of register 9 shown on pages 31 32 select the trigger source If you select software triggering a write to the register 0 with any value will trigger an A D conversion 3l Chapter4 4 3 A D Range Control BASE 1 Each A D channel has its own individual input range controlled by range code stored in the onboard RAM If you want to change the range code for a given channel select the channel as the start channel in register BASE 2 MUX scan described in the next section then write the range code to bits 0 to 3 of BASE 1 B
51. ou have two choices 10 MHz or 1 MHz This lets you generate pacer output frequencies from 2 5 MHz to 0 00023 Hz 71 minutes pulse The following equation gives the pacer rate Pacer rate Divl Div2 Fclk 1 MHz or 10 MHz is set by JP1 as illustrated below Div and Div2 are dividers set in counter 1 and counter 2 in the Intel 8254 counter See page 51 for more information on the counter timer applications 10 MHz 1 MHz default o o 5 10m 1M 10M 1 o o oO DMA3 DMA1 O DMA3 2 2 3 Channel Configuration S E or diff JP2 The PCM 3718 cards offer 16 single ended or eight differential analog input channels Jumper JP2 sets the analog input channels as 16 single ended or 8 differential inputs as shown below 16 S E inputs Eight differential inputs default CEJ SIE o o o DIFF sg of DIFF PCM 3718 Series User Manual 14 2 2 4 External Input or D I O Selection JP3 PCM 3718H and PCM 3718HG Jumper JP3 controls the selection of signals on pin 1 at connector P2 Pin 1 on connector P2 can be connected to digital I O line 0 or to an External Clock as shown below External trigger input EXT C 3 o DIO 0 Digital I O Line DIO 0 default EXT DIO 0 PCM 3718HO For 3718 you can control signals on both pin 1 and pin 2 of connector P2 Pin can connect to digital I O line 0 DIO 0 and pin 2 can connect to digital I O line 2
52. ow for one input clock period then go high again If you reload the count register during counting the new count will be loaded on the next CLK pulse The count will be inhibited while the GATE input is low MODE 5 Hardware Triggered Strobe The counter will start counting after the rising edge of the trigger input and will go low for one clock period when the terminal count is reached The counter is retriggerable 57 Chapter 7 7 4 Counter Operations Read Write Operation Before you write the initial count to each counter you must first specify the read write operation type operating mode and counter type in the control byte and write the control byte to the control register BASE 15 Since the control byte register and all three counter read write registers have separate addresses and each control byte specifies the counter it applies to set by SC1 and SCO no instructions on the operating sequence are required Any programming sequence following the 8254 convention is acceptable There are three types of counter operations read load LSB read load MSB and read load LSB followed by MSB It is important that you make your read write operations in pairs and keep track of the byte order Counter Read back Command The 8254 counter read back command lets you check the count value programmed mode and current states of the OUT pin and Null Count flag of the selected counter s You write this command to the control word re
53. r counter version 2 The popular 8254 offers three independent 16 bit down counters Each counter has a clock input control gate and an output You can program each counter for maximum count values from 2 to 65535 Version 2 of the 8254 has a maximum input clock frequency of 10 MHz The PCM 3718 provide 1 MHz and 10 MHz input frequencies to the 8254 from an onboard crystal oscillator Jumper JP1 controls the input frequency See page 12 for more information Counters 1 and 2 on the 8254 are cascaded and operated in a fixed divider configuration Counter 1 input is connected to the 1 MHz or 10 MHz clock frequency and the output of Counter 1 is connected to the input of Counter 2 The output of Counter 2 is internally configured to provide trigger pulses to the A D converter as shown below COUNTER 1 COUNTER2 MZ OR 10MHZ OSC akn SR JUL Intel 8254 has six operational modes from Mode 0 through Mode 5 To generate a pacer clock program both Counter 1 and Counter 2 for Mode 3 square wave generation PCM 3718 Series User Manual 52 7 2 Counter Read write Control Register The 8254 programmable interval timer uses four registers at addresses BASE 12 BASE 13 BASE 14 and BASE 15 Register functions are listed below Register Function BASE 12 Counter 0 read write BASE 13 Counter 1 read write BASE 14 Counter 2 read write BASE 15 Counter control word
54. se the MUX scan register to assign to a specified channel when you set channel input ranges with BASE 1 After you set the input range you will need to reset the MUX register for the proper start and stop channels 45 Chapter 5 5 4 Trigger Mode You can trigger an A D conversion from software from the module s on board pacer or from an external signal Bits 1 and 0 of register BASE 9 select the trigger source 1 If you select software triggering write to register 0 with any value to trigger an A D conversion High speed A D applications do not normally use software triggering because the triggering rate is too slow The PCM 3718 s onboard Intel 8254 programmable interval timer counter can generate periodic timing signals Counters 1 and 2 of the Intel 8254 provide A D converter trigger pulses with precise periods You can select pacer output between 2 5 MHz and 71 minutes per pulse Chapter 7 cover the details of the Intel 8254 timer counter Pacer triggering is ideal for interrupts and DMA data transfers nor mally used in A D applications which require higher conversion speeds You can also trigger the A D conversion from an external signal Wire the external signal to pin 1 on connector P2 and switch jumper JP3 to EXT You would normally use external triggering if your application requires A D conversions not periodically but condition ally e g to measure a voltage when a limit switch closes You can also use a

Download Pdf Manuals

image

Related Search

Related Contents

本機にはじめて電源を入れたときは HD DVDコンテンツの高画質・高精細  Manuel d`instruction  Mate PRF Nieve Antimoho  

Copyright © All rights reserved.
Failed to retrieve file