Home
PCI-1780 User Manual
Contents
1. Base Address PCI 1780 Register Format HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 N Counter 2 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO 10H N A R Counter 2 Load 150 CL15 CL14 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL4 CL2 CLO N A R Counter 2 Hold CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 CH2 CH1 CHO 14H N A R m Counter 2 Command C2 C1 CO 16H N A R W Counter 3 Mode 385 CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO N A R vii Counter 3 Load CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL4 CL3 CL2 CL1 CLO 1AH N A R n Counter 3 Hold CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 2 CH1 CHO N A R W Counter 3 Command C2 C1 C0 1EH N A R 31 Table C 1 PCI 1780 register format Part 3 Base PCI 1780 Register Format Address HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Counter 4 Mode S 15 14 CM13 12 CM11 CM10 CM9 CMS CM7 CM6 5 CM4 CM3 2 CM1 N A R W Counter 4 Load
2. 44 C 13 Board ID BASE 4EH The PCI 1780 offers Board ID register BASE 4EH With correct Board ID settings users can easily identify and access each card during hardware configuration and software programming Table C 12 PCI 1780 Register for board ID Addr 15 14 13 12 1 10 9 8 7 5 4 2 1 0 Board ID 4EH R BD3 BD2 BD1 BDO BD3 DBO Board ID BDO LSB of the Board ID BD3 MSB of the Board ID BD3 BD2 BD1 Board ID 1 1 1 1 15 1 1 1 0 14 1 1 0 1 13 1 1 0 0 12 1 0 1 1 11 1 0 1 0 10 1 0 0 1 9 1 0 0 0 8 0 1 1 1 7 0 1 1 0 6 0 1 0 1 5 0 1 0 0 4 0 0 1 1 3 0 0 1 0 2 0 0 0 1 1 0 0 0 0 0 45 C 14 FOUT 0 1 2 3 4 5 6 7 control BASE 50 5 Table C 13 PCI 1780 Register for FOUT 0 1 2 3 4 5 6 7 Control Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 FOUT 0 Control 50H W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 1 Control 52H W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 2 Control 54H W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 3 Control 56H W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 4 Control 58H W FOE FS2 FS1 FSO DV3 DV2
3. 29 VOVERVIEN v a EG 29 T O PORT ADDRESS MAP une a belie ada 29 COUNTER 0 1 2 3 4 5 6 7 MODE BASE 00 08 10 18 20 28 30 38H 36 C 4 COUNTER 0 1 2 3 4 5 6 7 LOAD BASE 02 0A 12 1A 22 2A 32 3AH 39 C 5 COUNTER 0 1 2 3 4 5 6 7 HOLD BASE 04 0C 14 1C 24 2C 34 3CH 40 C 6 COUNTER 0 1 2 3 4 5 6 7 COMMAND BASE 06 0E 16 1E 26 2E 36 3EH 41 C 7 COMMAND ENABLE BASEHOH 42 C 8 INTERRUPT CONTROL enne nnne 43 C 9 INTERRUPT STATUS BASE 42H 43 Hi C 10 CLEAR INTERRUPT 5 44 Cl DIGITAL OUTPUT BASES O 22 5082 KR ae 44 DIGITALINPUT BASE 48H s ei N etate teg 44 13 BOARD 4 45 C 14 FOUT 0 1 2 3 4 5 6 7 CONTROL 50 5 46 APPENDIX D WAVEFORM OF EACH MOBEE 49 D 1 MODE 51 10 2 MODE Bi WAVEFORM en i t 52 0 3 nen D o ape oin 53 D 4 MODE DD WAVEFORM Keen Hr e I ee ere isen 54 0 5 MODE E WAVEFORM sn 55 D 6 MODE F WAVEFORM san Ke SR ERR p NR SUED ER E Geer 56 D 7 MODE G WAVEFORM 2 5 57 D8 MODE H WAVEFORM urene
4. My Computer Geh gt 001 lt PCI 1780 BoardlD 7 0 c800H gt Sew Supported Devices 3 Advantech PCI 1761 Advantech PCI 1762 EA dvantech PCI 1780 2 Advantech PCL 711 711B About 34 Advantech PCL 720 Advantech PCL 722 724 731 38 Advantech PCL 725 3 Advantech PCL 726 727 728 Advantech PCL 730 El Aces DCL 72207724 TIR Fig 2 6 The Device Name appearing on the list of devices box Note As we have noted the device name 001 lt PCI 1780 BoardID 7 800 gt begins with a device number 000 which is specifically assigned to each card The device number is passed to the driver to specify which device you wish to control After your card is properly installed and configured you can click the Test button to test your hardware by using the testing utility we supplied For more detailed information please refer to Chapter 2 of the Device Drivers Manual You can also find the rich examples on the CD ROM to speed up your programming 17 18 3 Signal Connections 3 1 Overview Maintaining signal connections is one of the most important factors in ensuring that your application system is sending and receiving data correctly good signal connection can avoid unnecessary and costly damage to your PC and other hardware devices This chapter provides useful information about how to connect input and output signal
5. COUNT VALUE 2 XX XXX X XSSX 2X TK OX 1 XSSX OUTPUT 5 ST _ SOURCE N N N SS AV NZ N Z NN GATE N COUNT MX N XI X HX amp RY VALUE TC OUTPUT f TN TOTOGGLED OUTPUT Mode K Waveforms 61 D 12 Mode L waveform Hardware Triggered Delayed Pulse One Shot Mode L is similar to Mode J except that counting will not begin until a Gate edge is applied to an armed counter The counter must be armed before application of the triggering Gate edge Gate edges applied to a disarmed counter are disregarded The counter will start counting source edges and counting will proceed until the second TC Note that after application of a triggering Gate edge the Gate input will be disregarded for the remainder of the count cycle This differs from Mode K where the gate can be modulated throughout the count cycle to stop and start the counter On the first TC after application of the triggering Gate edge the counter will be reloaded from the Hold register On the second TC the counter will be reloaded from the Load register and counting will stop until new edge is issued to the counter Note that unlike Mode K new Gate edges are required alter every second TC to continue counting SOURCE SSS SS Y AX NS QOO NN VALDE MD t E a 6 CP ED GN NTN TC OUTPUT SS SS 5 5
6. PCI 1780 8 ch Counter Timer Card User Manual Copyright The documentation and the software included with this product are copyrighted 2002 by Advantech Co Ltd All rights are reserved Advantech 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 transmitted 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 is a trademark of Advantech Co Ltd IBM and PC are trademarks of International Business Machines Corporation MS DOS Windows Microsoft Visual C and Visual BASIC are trademarks of Microsoft Corporation Intel and Pentium are trademarks of Intel Corporation Delphi and C Builder are trademarks of Inprise Corporation CE notification The PCI 1780 developed by ADVANTECH CO LTD has 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 Please contact your local supplier for ordering information On line Technical Support For technical support and service p
7. Typical 5 V 900 mA _ Power Max 5 1 2 0 60 C 32 140 F rn refer to IEC 68 2 1 2 Storage 20 70 4 158 F Temperature 25 26 Appendix B Block Diagram PCI BUS Address Bus Address Decoder Interrupt Control Logic Data Bus D0 D15 PCI Interface 10 MHz OSC 16 bit Counter 0 7 Gate Control Logic Clock Source Select Logic Clock Divider 4 bit Fout 0 7 27 DIO Clock 0 7 28 Appendix C Register Structure and Format C 1 Overview The PCI 1780 is delivered with an easy to use 32 bit DLL driver for user programming under the Windows 2000 95 98 NT ME XP operating system We advise users to program the PCI 1780 using the 32 bit DLL driver provided by Advantech to avoid the complexity of low level programming by register The most important consideration in programming the PCI 1780 at register level is to understand the function of card s registers The information in the following sections is provided only for users who would like to do their own low level programming 2 Port Address Map PCI 1780 requires 32 consecutive addresses in the PC s I O space 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 add
8. m gt 1 2 1 3 Applications Q Event counting One shot output 3 Programmable frequency output Frequency measurement Pulse width measurement Li PWM output Periodic interrupt generation Time delay generation Installation Guide Before you install your PCI 1780 card please make sure you have the following necessary components 3 PCI 1780 DA amp C card PCI 1780 User s Manual Driver software Advantech DLL drivers included in the companion CD ROM Wiring cable PCL 10168 option 3 Wiring board ADAM 3968 option 2 Computer Personal computer or workstation with a PCI bus slot running Windows 2000 95 98 NT ME XP Some other optional components are also available for enhanced operation 3 Application software ActiveDAQ GeniDAQ or other third party software packages After you get the necessary components and maybe some of the accessories for enhanced operation of your Multifunction card you can then begin the Installation procedures Figure 1 1 on the next page provides a concise flow chart to give users a broad picture of the software and hardware installation procedures Install Driver from CD ROM then power off PC Install Hardware and power on PC Use driver utility to configure hardware Use test utility to test hardware Read examples amp driver manual Start to write your own application Fig 1 1 Installation Flow Chart 1 4 Software
9. The Advantech PCI 1780 offers the following main features Flexible Counter Modes The PCI 1780 features up to 12 programmable counter modes to provides one shot output PWM output periodic interrupt output time delay output and to measurement the frequency and the pulse width The PCI 1780 is an ideal solution for variant counter timer applications Special Shielded Cable for Noise Reduction The PCL 10168 shielded cable is specially designed for the PCI 1780 for reducing noise Its wires are all twisted pairs with input signals and output signals separately shielded providing minimal cross talk between signals and offering the best protection against EMI EMC problems Counter mode table N No gate control L Level gate control E Edge gate control Counter Mode A Special Gate CM6 Reload Source CM5 Repetition CM4 Z o o U 0 0 010 1 1 IL 18 Z o a 0 1 0 L Gate Control CM15 CM12 lt gt lt lt Count to once then disarm Count to TC twice then disarm Count to repeatedly without disarming lt lt lt lt lt Gate input dose not gate counter input Y Y Y V Count only during active gate level Y Y Start count on active gate edge and stop count on next Start count on active gate edge
10. CL7 CL6 CL5 CL2 CLO CL15 CLO Counter load data 39 C 5 Counter 0 1 2 3 4 5 6 7 hold BASE 04 0C 14 1C 24 2C 34 3CH Table C 4 PCI 1780 Register for counter 0 1 2 3 4 5 6 7 hold Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Counter 0 Hold 04H W CH15 14 CH13 CH12 CH11 CH10 9 CHS CH7 CH6 CH5 CHA CH3 2 CH1 CHO Counter 1 Hold OCH W CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 2 CHO Counter 2 Hold 14H W CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 CH2 CHO Counter 3 Hold 1CH W CH15 CH14 CH13 CH12 CH11 CH10 CH9 CHS CH7 CH6 CH5 CHA CH3 CH2 CH1 CHO Counter 4 Hold 24H W CH15 CH14 CH13 CH12 CH11 CH10 CH9 CHS CH7 CH6 CH5 CHA CH3 CH2 CH1 CHO Counter 5 Hold 2CH W CH15 CH14 CH13 CH12 CH11 CH10 9 CHS CH7 CH6 CH5 CHA CH3 2 CH1 CHO Counter 6 Hold 34H W CH15 CH14 CH13 CH12 CH11 CH10 9 CHS CH7 CH6 CH5 CHA CH3 2 CH1 CHO Counter 7 Hold 3CH W CH15 CH14 CH13 CH12 CH11 CH10 9 CHS CH7 CH6 CH5 CHA CH3 2 CH1 CHO CH15 CHO Counter hold data 40 C 6 Counter 0 1 2 3 4 5 6 7 command BASE 06 0E 16
11. W Counter 7 Mode m CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO N A R vii Counter 7 Load CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL4 CL3 CL2 CL1 CLO 3AH N A R Counter 7 Hold 36H CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 CH2 CH1 CHO N A R W Counter 7 Command C2 C1 C0 3EH N A R 33 Table C 1 PCI 1780 register format Part 5 Base Address PCI 1780 Register Format HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Command Enable CE7 CE6 CE5 CE4 CE3 CE2 CE1 CEO 40H N A R o Interrupt Control DIO C7 C5 C4 C3 C2 CO 42H Interrupt Status R W Clear Interrupt DIO C7 C6 C5 C4 C3 C2 C1 CU 44H N A R Digital Output DOS 204 DO1 DOO E Digital Input 017 DIG DIS DIA 013 DI2 DI1 DIO N A W 4EH Board ID R BD3 BD2 BD1 BDO 34 Table C 1 PCI 1780 register format Part 6 Base Address PCI 1780 Register Format HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 FOUT 0 Control FOE FS2 FS
12. CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 5 Mode 28H W CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 6 Mode 30H W CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 7 Mode 38H W CM15 14 CM13 CM12 CM11 CM10 CM8 CM6 CM5 CM4 CM3 CM2 CM1 CM0 Output control 00 Active high terminal count pulse 01 Active low terminal count pulse 10 TC toggled from low 11 TC toggled from high CM2 Output enable control 0 Disable high impedance 1 Enabled CM3 Count control up down 0 Count down 1 Count up CM4 Count control once repetitively 0 Count Once 1 Count Repetitively 36 CM5 Count control reload 0 Reload from LOAD register 1 Reload from LOAD or HOLD register CM6 Count control special gate 0 Disable special gate 1 Enable special gate CM7 Count control special gate 0 Count on rising edge 1 Count on falling edge CM8 Count source selection 0000 Internal clock 0001 OUT N 1 0010 CLK N 0011 CLK N 1 0100 FOUT 0 0101 FOUT 1 0110 FOUT 2 0111 FOUT 3 1000 FOUT 4 1001 FOUT 5 1010 FOUT 6 1011 FOUT 7 1100 GATE N 1 1101 N A 1110 N A 1111 N A CM13 CM12 Gate source selection 00 No gating 01 OUT N 1 10 GATE N 11 GATE N 1 37 CM14 Gating polarity selection 0
13. DV1 DVO FOUT 5 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 6 Control 5CH W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO FOUT 7 Control 5EH W FOE FS2 FS1 FSO DV3 DV2 DV1 DVO DVO FOUT divider 0000 Divide by I 0001 Divide by 2 0010 Divide by 3 0011 Divide by 4 0100 Divide by 5 0101 Divide by 6 0110 Divide by 7 0111 Divide by 8 1000 Divide by 9 1001 Divide by 10 1010 Divide by 11 1011 Divide by 12 1100 Divide by 13 1101 Divide by 14 1110 Divide by 15 1111 Divide by 16 46 FS2 FSO FOE FOUT source 000 External clock 001 CLK N 010 FOUT N 1 011 10 MHz clock 100 I MHz clock 101 100 KHz clock 110 10 KHz clock 111 I KHz clock FOUT output enable 0 Disable 1 Enable 47 48 Appendix D Waveform of each mode The PCI 1780 offers 16 powerful counter functions to fulfill your industrial or laboratory applications This chapter will describe each mode in detail with the waveform diagram Counter mode descriptions Counter Mode register bits CM 15 CM12 and CM6 CM4 select the operating mode for each counter see Table D 1 To simplify references to a particular mode each mode is assigned a letter from A through X Representative waveforms for the counter modes are illustrated in Figure A through X because the letter suffix in the figure number is keyed to the mode Figures M N P Q V W do not exist The figures assume counting on rising source edges Those modes
14. Overview Advantech offers a rich set of DLL drivers third party driver support and application software to help fully utilize the functions of your PCI 1780 card Device Drivers on the companion CD ROM LabVIEW driver Advantech ActiveDAQ Advantech GeniDAQ Coco Programming choices for DA amp C cards You may use Advantech application software such as Advantech Device Drivers On the other hand advanced users can use another option for register level programming although it is not recommended due to its laborious and time consuming nature Device Drivers The Advantech Device Drivers software is included on the companion CD ROM at no extra charge It also comes with all Advantech DA amp C cards Advantech s device drivers feature a complete I O function library to help boost your application performance The Advantech Device Drivers for Windows 2000 95 98 ME NT XP works seamlessly with development tools such as Visual C Visual Basic Inprise C Builder and Inprise Delphi Register level Programming Register level programming is reserved for experienced programmers who find it necessary to write code directly at the level of device registers Since register level programming requires much effort and time we recommend that you use the Advantech Device Drivers instead However if register level programming is necessary you should refer to the relevant information in Appendix C Register Structure and Format or to
15. TC the counter will reload from the Load register and automatically disarm itself inhibiting further counting until a new ARM command is issued AA A VA A V NA A S A A NA S A A ANA N N WR N COMMAND SS SS X X L X L 1 X 12 XSS X Kel X K XSS X 2 1 X 0 X L AS 221m E OUPUT SS SS X Mode B Waveforms 52 D 3 SOURCE WR GATE COUNT VALUE Mode C waveform Hardware Triggered Strobe Mode C is identical to Mode A except that counting will not begin until a Gate edge is applied to the armed counter the counter must be armed before application of the triggering Gate edge Gate edges applied to a disarmed counter are disregarded The counter will start counting on the first source edge after the triggering Gate edge and will continue counting until TC At TC the counter will reload from the Load register and automatically disarm itself Counting will then remain inhibited until a new ARM command and a new Gate edge are applied in that order Note that after application of a triggering Gate edge The Gate input will be disregarded for the remainder of the count cycle This differs from Mode B where the Gate can be modulated throughout the count cycle to stop and start the counter NS SSE x E C2 CY EA GR TC OUTPUT SS TC TOGGLED _ ne OUTPUT Mode C Waveforms 53 D 4 Mode
16. and stop count on next Y Start count on active gate edge and stop count on second TC Y Y Start count on active gate edge and stop count on inactive gate edge Y Y Y Reload counter from Load Register Viviviviviv E alternating reload source between Load Dee Note Counter modes Q 5 Ware identical D E J 50 D 1 Mode A waveform Software Triggered Strobe with No Hardware Gating Mode A is one of the simplest operating modes The counter will be available for countering source edges when it is issued and ARM command On each TC the counter will reload from the Load register and automatically disarm itself inhibiting further counting Counting will resume when a new ARM command is issued SOURCE XJ X N N N SSN V VVV VN WR p MD SS 55 vas iu A ED ED EMOS LD ED gt TC OUTPUT E GNE _ A CS X OUTPUT Mode A Waveforms 51 D 2 Mode B waveform Software Triggered Strobe with Level Gating Mode B is identical to Mode A except that source edges are counted only when the assigned Gate is active The counter must be armed before counting can occur Once armed the counter will count all source edges that occur while the Gate is active and disregard those edges which occur while the Gate is inactive This permits the Gate to turn the count process on and off On each
17. and stop count on second Start count on active gate edge and stop count on inactive gate edge Reload counter from Load Register on TC Z Reload counter on each alternating reload source between Load and Hold Registers Counter Mode Special Gate CM6 Reload Source CM5 Repetition CM4 Fal lel lO l elle e zi PS Z o U Gate Control 15 12 s z o o S lt rlolo z lt ml elel Count to TC once then disarm Count to TC twice then disarm Count to repeatedly without disarming lt lt lt lt lt Gate input dose not gate counter input V V Count only during active gate level Y Y Start count on active gate edge and stop count on next Y Y Start count on active gate edge and stop count on second TC Y Start count on active gate edge and stop count on inactive gate edge Y 7 Reload counter from Load Register Reload counter on each alternating reload source between Load and Hold Registers Viv Note Counter modes M N P Q S T V W are identical to A B D E G H J K Note amp For detailed specifications of the PCI 1780 please refer to Appendix A Specifications m lol r
18. continue with the reload source alternating on each TC until DISARM command is issued to the counter The third TC reloads form the Hold register the fourth TC reloads form the Load register etc Specifying the TC Toggled output in the Counter Mode register can generate a variable duty cycle output The Load and Hold values then directly control the output duty cycle with high resolution available when relatively high count values are used ZU NV N N M NR NTS V VVV X X Xo 2 X 1 X t X A X12 XSSX 2 X 1 X t XXX S FN TC TOGGLED X X X OUTPUT Mode J Waveforms 60 D 11 Mode K waveform Variable Duty Cycle Rate Generator with Level Gating Mode K is identical to Mode J except that source edges are only counted when the Gate is active The counter must be armed for counting to occur Once armed the counter will count all source edges that occur while the Gate is active and disregard those source edges that occur while the Gate is inactive This permits the Gate to turn the count process on and off As with Mode J the reload source used will alternate on each TC starting with the Hold register on the first TC after any allows the Gate to modulate the duty cycle of the output waveform It can affect both the high and low portions of the output waveform SOURCE N NV A NA A V N S ANA N NA N S N N NA N NA VSA XXXXX
19. which automatically disarm the counter CM4 0 are shown with the WR pulse entering the required ARM command for modes which count repetitively CM4 1 the ARM command is omitted Both a TC output waveform and a TC Toggled output waveform are shown for each mode The symbols L and H are used to represent count values equal to the Load and Hold register contents respectively The symbols K and N represent arbitrary count values For each mode the required bit pattern in the Counter Mode register is shown don t care bits are marked X These figures are designed to clarify the mode descriptions To keep the following mode descriptions concise and to the point the phrase source edges is used to refer to active going source edges only not to inactive going edges Similarly the phrase gate edges refers only to active going gate edges Also again to avoid verbosity and euphuism the descriptions of some modes state that a counter is stopped or disarmed on a TC inhibiting further counting 49 As is fully explained in the TC section of the document for these modes the counter is actually stopped or disarmed following the active going source edge which drives the counter out of TC In other words since a counter in the TC state always counts irrespective of it s gating of arming status the stopping disarming of the count sequence is delayed until TC is terminated Counter mode table N No gate control L Leve
20. 1 FSO DV3 DV2 DV1 DVO 50H N A R v FOUT 1 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO 52H N A R W FOUT 2 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO 54H N A R W FOUT 3 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO 56H N A R W FOUT 4 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO 58H N A R FOUT 5 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO BAH NIA R FOUT 6 Control FOE FS2 FS1 FSO DV3 DV2 DV1 DVO 5CH N A R W FOUT 7 Control FOE FS2 FS1 FS0 DV3 DV2 DV1 DV0 5EH N A R 35 C 3 Counter 0 1 2 3 4 5 6 7 mode BASE 00 08 10 18 20 28 30 38H Table C 2 PCI 1780 Register for counter 0 1 2 3 4 5 6 7 mode Base addr 15 14 13 12 1 101 9 8 7 5 4 2 1 0 Counter 0 Mode W CM15 CM14 CM13 12 CM11 CM10 CM9 CM8 CM6 CM5 CM4 CM3 CM2 CM1 Counter 1 Mode 08H W CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 2 Mode 10H w CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 3 Mode 18H W CM15 CM14 CM13 CM12 CM11 CM10 CM9 CM8 CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO Counter 4 Mode 20H W CM15
21. 1E 26 2E 36 3EH Table C 5 PCI 1780 Register for counter 0 1 2 3 4 5 6 7 command Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 2 Counter 0 Command 06H W C2 Counter 1 Command OEH W C2 Counter 2 Command 16H W C2 Counter 3 Command W C2 Counter 4 Command 26H W C2 Counter 5 Command 2EH W C2 Counter 6 Command 36H W C2 Counter 7 Command 3EH W C2 C2 CO Command code 000 Disarm counter 001 Load counter from LOAD 010 Disarm and save counter 011 Step counter 100 Arm counter 101 Load counter Arm counter 110 Save counter to HOLD 111 Reset counter 41 C 7 Command enable BASE 40H Table C 6 PCI 1780 Register for command enable Base Addr 15 14 13 12 11 10 9 7 5 4 2 0 Command enable 40H W CE6 CE5 CE4 CE2 CEO CEn Counter command enable bit n 0 7 0 1 Don t select this counter Select the counter 42 8 Interrupt control BASE 42H Table C 7 PCI 1780 Register for interrupt control Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 Ter Interrupt control DIO c7 5 Cn Counter interrupt enable bit 0 7 0 Disable interrupt for this counter 1
22. 5 L Waveforms 62 D 13 Mode O waveform Hardware Triggered Strobe with Edge Disarm Mode O shown in Figure O is identical to Mode C except that the counter will be disarmed while an inactive going Gate edge is applied to the counter And the counter will hold the count value until it is issued a LOAD command or REST command SVS SSN WR NG SS COUNT VALUE Tor TC TOGGLED NS X OUTPUT GE uL NR SSS SSN wR WI SS care TE Ae C VALUE x CH CD SXXX TC OUTPUT TOGGLED OUTPUT Mode O Waveforms 63 D 14 Mode R waveform Non Retriggerbale One Shot with Edge Disarm Mode R is identical to Mode F except that the counter will be disarmed while an inactive going Gate edge is applied to the counter And the counter will hold the count value until it is issued a LOAD command or REST command SUME INN IEN Nu NIS II NA NINE OL eI NON Q gt m NOOO 5 AA LD ED TC OUTPUT SS TOGGLED 5 12 22 4 OUTPUT ve SST NINES on XE XE XE UD TC OUTPUT SS TC TOGGLED EE 2 6 OUTPUT Mode R Waveforms 64 D 15 Mode U waveform Hardware Triggered Delayed Pulse Strobe with Edge Disarm Mode U is identical to Mode I except that the counter will be disarmed while the Gate an inactive going Gate edge i
23. 58 D 9 59 PIO MODE Sabine 60 MODER WAVEFORM un gasspedalen 61 D 12 MODE E WAVEFORM nu seine feier e ee e Ite pete oci oe 62 D 13 MODE O WAVEFORM cette eet edt init ae ss 63 DJA MODE R WAVEFORM huset Sk Re einen 64 D 15 MODE U WAVEFORM reip ete de a rnt 65 0 16 MODE X WAVEFORM 1 pee reote ere eee e te Hg de e eee ign 66 iv 1 Introduction 1 1 Thank you for buying the Advantech PCI 1780 The PCI 1780 is a general purpose multiple channel counter timer card for the PCI bus It targets the AM9513 to implement the counter timer function by CPLD It provides eight 16 bit counter channels and 8 digital outputs and 8 digital inputs The powerful Advantech designed counter functions fulfill your industrial or laboratory application needs The following sections of this chapter will provide further information about features of the multifunction cards a Quick Start for installation together with some brief information on software and accessories for the PCI 1780 card Features 8 independent 16 bit counters 8 programmable clock source 18 digital TTL outputs and 8 digital TTL inputs Up to 20 MHz input frequency 2 Multiple counter clock source selectable 4 Counter output programmable 4 Counter gate function Flexible interrupt source select Board ID
24. CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL4 CL3 CL2 CL1 CLO 22H NIA R Counter 4 Hold aa CH15 14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 2 CH1 CHO N A R Wi Counter 4 Command C2 C1 CO 26H N A R vi Counter 5 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO 28H N A R Counter 5 Load CL15 CL14 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL4 CL2 CLO N A R W Counter 5 Hold CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CHO 2CH N A R vi Counter 5 Command C2 C1 CO 2EH N A R 32 Table C 1 PCI 1780 register format Part 4 Base Address PCI 1780 Register Format HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Counter 6 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO 30H N A R Counter 6 Load AT CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL4 CL2 CLO N A R W Counter 6 Hold CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CHO 34H N A R W Counter 6 Command C2 C1 CU 36H N A R
25. D waveform Rate Generator with No Hardware Gating Mode D is typically used in frequency generation applications In this mode the Gate input does not affect counter operation Once armed the counter will count to TC repetitively On each TC the counter will reload itself from the Load register hence the Load register value determines the time between TCs A square wave rate generator may be obtained by specifying the TC Toggled output mode in the Counter Mode register SOURCE SPSS M SS V N PF PF VALUE 2 XSSK2 X X X E TC OUTPUT SS N SS OurPuT X SS X 55 X Mode D Waveforms 54 D 5 SOURCE GATE COUNT VALUE Mode E waveform Rate Generator with Level Gating Mode E is identical to Mode D except the counter will only count those source edges that occur while the Gate input is active This feature allows the counting process to be enabled and disabled under hardware control square wave rate generator may be obtained by specifying the TC Toggled output mode N NVA NAVA VA S A A A N S A A NA N N NOU gt SS X X X X a X 2 XSS X X K XSSX X X X EX TC OUTPUT 55 5 S TC TOGGLED Y SS SS X OUTPUT Mode Waveforms 55 D 6 SOURCE GATE COUNT VALUE Mode F waveform Non Retriggerable One Shot Mode F provides a non retriggerable one shot timing function The counter
26. Enable interrupt for this counter DIO Interrupt enable bit 0 Disable interrupt for DIO 1 Enable interrupt for DIO C 9 Interrupt status BASE 42H Table C 8 PCI 1780 Register for interrupt status Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 ard ee Interrupt control DIO C7 C5 C3 Cn Counter interrupt status bit 0 7 0 No interrupt occurred 1 Interrupt occurred DIO Interrupt status bit 0 No interrupt occurred form DIO 1 Interrupt occurred form DIO 43 C 10 Clear interrupt BASE 44H Write any data to these two bytes to clear the interrupt Table C 9 PCI 1780 Register for clear interrupt Base adar 15 14 13 12 1 10 9 8 7 5 4 2 0 Clear 44H W 11 Digital output BASE 48H Table C 10 PCI 1780 Register for digital output BaseAddr 15 14 13 12 1 101 9 8 7 5 4 2 1 0 ln Digital output 007 DOS 004 DO2 DO1 DOO C 12 Digital input BASE 48H Table C 11 PCI 1780 Register for digital input 15 14 13 12 1 10 9 8 7 5 2 0 Digital input DI7 DI6 DIS DIZ 02 DIO
27. High level for level active rising edge for edge active 1 Low level for level active falling edge for edge active CM15 Gate active edge or level 0 Level active 1 Edge active 38 C 4 Counter 0 1 2 3 4 5 6 7 load BASE 02 0A 12 1A 22 2A 32 3AH Table C 3 PCI 1780 Register for counter 0 1 2 3 4 5 6 7 load Base Addr 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Counter 0 Load 02H W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL2 CLO Counter 1 Load OAH W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL2 CLO Counter 2 Load 12H W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL2 CLO Counter 3 Load 1AH W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL2 CLO Counter 4 Load 22H W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL2 CLO Counter 5 Load 2AH W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL2 CLO Counter 6 Load 32H W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8 CL7 CL6 CL5 CL2 CLO Counter 7 Load 3AH W CL15 CL14 CL13 CL12 CL11 CL10 CL9 CL8
28. al for a detailed listing of the Error Code Error ID and the Error Message 1 6 Accessories Advantech offers a complete set of accessory products to support the PCI 1780 card These accessories include Wiring Cable QPCL 10168 The PCL 10168 shielded cable is specially designed for PCI 1780 cards to provide high resistance to noise To achieve better signal quality the signal wires are twisted in such a way as to form a twisted pair cable reducing cross talk and noise from other signal sources Furthermore its analog and digital lines are separately sheathed and shielded to neutralize EMI EMC problems Wiring Boards ADAM 3968 The ADAM 3968 is 68 5 51 wiring terminal module for DIN rail mounting This terminal module can be readily connected to the Advantech PC Lab cards and allow easy yet reliable access to individual pin connections for the PCI 1780 card 2 Installation 2 1 This chapter gives users a package item checklist proper instructions about unpacking and step by step procedures for both driver and card installation Unpacking After receiving your PCI 1780 package please inspect its contents first The package should contain the following items M PCI 1780 card M Companion CD ROM DLL driver included M User s Manual The PCI 1780 card harbors certain electronic components vulnerable to electrostatic discharge ESD ESD could easily damage the integrated circuits and certain compo
29. ard into your system since this will guarantee a smooth installation process The Advantech Device Drivers Setup program for the PCI 1780 card is included on the companion CD ROM that is shipped with your DA amp C card package Please follow the steps below to install the driver software Step 1 Insert the companion CD ROM into your CD ROM drive Step 2 The Setup program will be launched automatically if you have the autoplay function enabled on your system When the Setup Program is launched you ll see the following Setup Screen Note amp If the autoplay function is not enabled on your computer use Windows Explorer or the Windows Run command to execute SETUP EXE on the companion CD ROM AD ANTECH Device Driver V2 0 Ins Device Manager Latest device drivers help to optimize the Individual Drivers performance of Advantech device Examples amp Utilities Toure Fig 2 1 The Setup Screen of Advantech Automation Software 11 Step 3 Select the Individual Drivers option Step 4 Select the specific device then just follow the installation instructions step by step to complete your device driver setup Device Driver V2 0 Inst PC1 1723 PCI 1730 PCIAT33 PCL1750 PCL1751 PCI 1712L PCI 1752 PCI 1710L PCI 1716 PCI 1753 E PCI 1710HG PCI 1716L 1754 PCI 1710HGLPCI 1731 PCI 1711 PCI 1711L PCI 1712 PCI 1240 PCI 1784 Full Installation Fig 2 2 Different op
30. e I is identical to Mode G except the counting will not begin until a Gate edge is applied to an armed counter The counter must be armed before application of the triggering Gate edge Gate edges applied to a disarmed counter are disregarded An armed counter will start counting on the first source edge after the triggering Gate edge Countering will then proceed in the same manner as in Mode G After the second TC the counter will disarm itself An ARM command and Gate edge must be issued in this order to restart counting Note that after application of a triggering Gate edge the Gate input will be disregarded until the second TC This differs form Mode H where the Gate can be modulated throughout the count cycle to stop and start the counter SOURCE SS SS 2 ARM XRO 5555 VALUE x X Xu SENER I 2 X X X 1 TC OUTPUT SS SS R SS X SS X Mode I Waveforms 59 D 10 Mode J waveform SOURCE COUNT VALUE TC OUTPUT Variable Duty Cycle Rate Generator with No Hardware Gating Mode J will find the greatest usage in frequency generation applications with variable duty cycle requirements Once armed the counter will count continuously until it is issued a DISARM command On the first TC the counter will be reloaded from the Hold register Counting will then proceed until the second TC at which time the counter will be reloaded from the Load register Counting will
31. er Note amp If your card is properly installed you should see the device name of your card listed on the Device Manager tab If you do see your device name listed on it but marked with an exclamation sign it means your card has not been correctly installed In this case remove the card device from the Device Manager by selecting its device name and press the Remove button Then go through the driver Installation process again After your card is properly installed on your system you can now configure your device using the PCI 1780 Utility program that has itself already been installed on your system during driver setup A complete device installation procedure should include board selection and device setup After that you can operate this card through the operation The following sections will guide you through the board selection device setup and operation of your device 14 2 4 Device Setup amp Configuration The PCI 1780 Utility program is a utility that allows you to setup configure and test your device and later store your settings on the system registry These settings will be used when you call the APIs of Advantech Device Drivers Setting Up the Device Step 1 To install the I O device for your card you must first run the Device Manager program by accessing Start Programs Advantech Device Drivers V2 0 Step 2 You can then view the device s already installed on your system if any in the Insta
32. h is a particular fit for a high frequency signal Counter 0 LIT Counter 1 Standard Clock Unknown Signal Figure 3 4 Frequency measurement Implementing this measurement needs two counters One for the up cycle period another for the down cycle period Adding them together gives the total period The duty cycle can also be calculated by dividing the up period by the total period Connect the unknown signal to each counter s Gate Apply a standard clock to each counter Counter 0 counts the up cycle Counter 1 counts the down cycle In PCI 1780 wiring is simple Only connect the unknown signal to counter 0 and use the register to select the gate source Counter 0 select the Gate N counter 1 select the Gate N 1 Apply the standard clock to both counters by clock source select register It could change the clock for different measurement range Counter 0 set as Mode O and gate polarity is positive 24 Appendix A Specifications Programmable Counter 8 independent 16 bit Programmable Clock Source 8 independent ndent Programmable 12 Counter Modes Max Frequency 20 MHz Interrupt source 8 counter outputs Digital Input Output Input Channels 8 Low 0 8 V max TETE High 24 min Interrupt source Channel 0 Output Channels 8 Low 0 5 V max amp 24 mA sink High 24 V min 15 mA source General VO Connector 68 pin SCSI II female Type 175 mm x 100 mm 6 9 x 3 9
33. l gate control E Edge gate control Table D 1 PCI 1780 counter mode Counter Mode A BJ CIDJ E F G IHJ I J KI L Special Gate CM6 0 01000000000 Reload Source CM5 OOO ab qoa qat qa ET Repetition CM4 0 0 0 11 1 1 0 01 0 11 1 1 Gate Control 15 12 NIL IE INIL EIN LJ EIN LJ E Count to TC once then disarm Count to twice then disarm le Count to TC repeatedly without disarming v v Gate input dose not gate counter input Y T V Y Count only during active gate level Y Y Start count on active gate edge and stop count on next Start count on active gate edge and stop count on second Y Y Start count on active gate edge and stop count on inactive gate edge Reload counter from Load Register on TC l KG es TC alternating reload source between Load PE Ae Counter Mode MINJO PIQIRIS T U V W X Special Gate CM6 1 1 Il 1 1 1 1 1 1 1 1 1 Reload Source CM5 Repetition CM4 0 0 0 11 1 1 0 01 0 11 1 1 Gate Control 15 12 NIL IE IN IL EIN LJ EIN LJ E Count to TC once then disarm Count to twice then disarm Count to repeatedly without disarming Vivdlv Gate input dose not gate counter input Y Count only during active gate level Y Y Start count on active gate edge
34. lease visit our support website at http www advantech com support Note Concerning environmental protection to reduce the paper used for the user s manual Starting the page of Appendix C please use the PDF file on the CD ROM or download form support on www advantech com Part No 2003178010 2nd Edition Printed in Taiwan May 2005 11 Contents pner pP Y 1 FRATURES C rete ee trea re e o E 1 12 APPLICATIONS SE rS 3 1 INSTALLATION GUIDE 3 1 4 SOFTWARE OVERVIEW u a einen nein nahen 5 1 5 DEVICE DRIVERS PROGRAMMING ROADMAP 6 1 6 e ee TTT DANS EAD TAA A NN 9 2 1 UNPACKING an ierni ER E 9 2522 DRIVER On HRES R Le 11 2 3 HARDWARE NSTALEATI N cor 12 2 4 DEVICE SETUP amp CONFIGURATION 15 SIGNAL CONNECTIONS 19 EM NE ODD M IET 19 3 2 SWITCH AND JUMPER SETTINGS nennen nnne seen tete nnne seen nete nnns 19 3 3 SIGNAL CONNECTIONS 21 APPENDIX A SPECIFICATIONS 25 APPENDIX B BLOCK DIAGRANA 27 APPENDIX C REGISTER STRUCTURE AND FORMAT
35. lled Devices list box Since you haven t installed any device yet you might see a blank list such as the one below Fig 2 4 Device Manager 2 0 1 Your ePlatform Partner Davies Manager m Installed Devices My Computer Setup Test Remove Close Supported Devices Advantech PCI 1761 3 Advantech PCI 1762 Advantech PCI 1780 28 Advantech PCL 711 711B Advantech PCL 720 El 38 Advantech PCL 722 724 731 238 Advantech PCL 725 238 Advantech PCL 726 727 728 3 Advantech PCL 730 Adital DCL 722 724 1796 el Bite Fig 2 4 The Device Manager dialog box 15 Step 3 Scroll down the Supported Devices box to find the device that you wish to install then click the Add button to evoke the Existing unconfigured PCI 1780 dialog box such as one shown in Fig 2 5 The Existing unconfigured PCI 1780 dialog box lists all the installed devices on your system Select the device you want to configure from the list box and press the OK button Advantech PCI 1780 device s found Ed List below is how many PCI 1780 cards on MotherBoard Please select one from listing Device PCI 1780 BoardD 1 0 C800H IRG 10 Fig 2 5 The Device s Found dialog box 16 Step 4 After you have finished configuring the device click OK and the device name will appear in the Installed Devices box as seen below m Installed Devices
36. must be armed before it will function Application of a Gate edge to the armed counter will enable counting When the counter reaches TC it will reload itself from the Load register The counter will then stop counting awaiting a new Gate edge Note that unlike Mode C anew ARM command is not needed after TC only new Gate edge After application of a triggering Gate edge the Gate input is disregard until TC FN EI NP NII RIOT NP NPT PS WAM E ED CY EDEN OUTPUT S S TC TOGGLED lt X OUTPUT Mode F Waveforms 56 D 7 SOURCE WR COUNT VALUE TC OUTPUT Mode G waveform Software Triggered Delayed Pulse One Shot In Mode G the Gate does not affect the counter s operation Once armed the counter will count to TC twice and then automatically disarm itself For most applications the counter will initially be loaded from the Load register either by a LOAD command or by the last TC of an earlier timing cycle Upon counting to the first TC the counter will reload itself from the Hold register Counting will proceed until the second TC when the counter will reload itself from the Load register and automatically disarm itself inhibiting further counting Counting can be resumed by issuing new ARM command Specifying the TC Toggled output mode in the Counter Mode register may generate a software triggered delayed pulse one shot The initial counter contends control
37. nents if preventive measures are not carefully paid attention to Before removing the card from the antistatic plastic bag you should take following precautions to ward off possible ESD damage Touch metal part of your computer chassis with your hand to discharge static electricity accumulated on your body Or use a grounding strap Touch the anti static bag to a metal part of your computer chassis before opening the bag Take hold of the card only by the metal bracket when removing it from the bag After taking out the card first you should Inspect the card for any possible signs of external damage loose or damaged components etc If the card is visibly damaged please notify our service department or the local sales representative immediately Avoid installing a damaged card into your system Also pay extra caution to the following aspects to ensure proper installation A Avoid physical contact with materials that could hold static electricity such as plastic vinyl and Styrofoam X Whenever you handle the card grasp it only by its edges DO NOT TOUCH the exposed metal pins of the connector or the electronic components Note Keep the anti static bag for future use You might need the original bag to store the card if you have to remove the card from the PC or transport it elsewhere 10 2 2 Driver Installation We recommend you to install the driver before you install the PCI 1780 c
38. of the delay from the ARM command until the output pulse starts The Hold register contents control the pulse duration ISS 55 55 55 XX 3 X X ENN XX X SS 55 TC TOGGLED SS X 5 OUTPUT Mode G Waveforms 57 D 8 Mode H waveform Software Triggered Delayed Pulse One Shot with Hardware Gating Mode H is identical to Mode G except that the Gate input is used to qualify which source edges are to be counted The counter must be armed for counting to occur Once armed the counter will count all source edges that occur while the Gate is active and disregard those source edges that occur while the Gate is inactive This permits the Gate to turn the count process on and off As with Mode G the counter will be reloaded from the Hold register on the first TC and reloaded from the Load register and disarmed on the second TC This mode allows the Gate to control the extension of both the initial output delay time and the pulse width SOURCE SNV VJ VVAA V V V VAV V V V V V VSAA WR N 95 5 NN SEE 55 SS COUNT O OSI Xi Xt Xi TC OUTPUT S Sa P gt m SS SOURCE N N N N SS N N N WR SS GATE N 55 COUNT MY N XT XT X L VALUE TC OUTPUT SS 7 TOGGLED lt X OUTPUT Mode H Waveforms 58 D 9 Mode I waveform Hardware Triggered Delayed Pulse Strobe Mod
39. ories 37 pin cable wiring terminals etc If necessary to the PCI card Step 8 Replace the cover of your computer chassis Re connect the cables you removed in step 2 Step 9 Plug in the power cord and turn on the computer Note amp In case you installed the card without installing the DLL driver first Windows 95 98 ME will recognize your card as an unknown device after rebooting and will prompt you to provide the necessary driver You should ignore the prompting messages just click the Cancel button and set up the driver according to the steps described in 2 2 Driver Installation After the PCI 1780 card is installed you can verify whether it is properly installed on your system in the Device Manager 1 Access the Device Manager through Control Panel System Device Manager 2 The device name of the PCI 1780 should be listed on the Device Manager tab on the System Property Page 13 System Properties MEI General Device Manager Hardware Profiles Performance 6 View devices by type View devices by connection m Computer B AdvantechDAQ Advantech PCI 1780 Disk drives Display adapters 3 Floppy disk controllers amp Hard disk controllers Keyboard E Monitors Hy Mouse Network adapters 9 Ports COM amp LPT System devices 2 Universal Serial Bus controllers Properties Refresh Remove Print Fig 2 3 The device name listed in the Device Manag
40. r such as the default installation path Program Files Advantech ADSAPTI Examples For information about using other function groups or other development tools please refer to the Creating Windows 95 NT 2000 Application with Device Drivers chapter and the Function Overview chapter on the Device Drivers Manual Programming with Device Drivers Function Library Advantech Device Drivers offers a rich function library to be utilized in various application programs This function library consists of numerous APIs that support many development tools such as Visual C Visual Basic Delphi and C Builder According to their specific functions or services those APIs can be categorized into several function groups Digital Input Output Function Group Counter Function Group Port Function Group direct I O Event Function Group For the usage and parameters of each function please refer to the Function Overview chapter in the Device Drivers Manual Troubleshooting Device Drivers Error Driver functions will return a status code when they are called to perform a certain task for the application When a function returns a code that is not zero it means the function has failed to perform its designated function To troubleshoot the Device Drivers error you can pass the error code to DRV_GetErrorMessage function to return the error message Or you can refer to the Device Drivers Error Codes Appendix in the Device Drivers Manu
41. ress and BASE 6 is the base address plus six bytes Table C 1 shows the function of each register of the PCI 1780 or driver and its address relative to the card s base address 29 Table C 1 PCI 1780 register format Part 1 Base PCI 1780 Register Format Address HEX 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Counter 0 Mode Bon CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO N A R Counter 0 Load CL15 CL14 CL12 CL11 CL10 CL9 CL7 CL6 CL5 CL4 CL2 CLO 02H NIA R Counter 0 Hold rat CH15 14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CHA CH3 CH2 CH1 CHO N A R Wi Counter 0 Command C2 C1 CO 06H N A R vi Counter 1 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 CMS CM7 CM6 CM5 CM4 CM3 CM2 CM1 CMO 08H N A R i Counter 1 Load CL15 CL14 CL13 CL12 CL11 CL10 CL9 8 CL7 CL6 CL5 CL4 CL2 CL1 CLO N A R W Counter 1 Hold CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CHO OCH N A R vi Counter 1 Command C2 C1 CO OEH N A R 30 Table C 1 PCI 1780 register format Part 2
42. s applied to the counter And the counter will hold the count value until it is issued a LOAD command or REST command SOURCE LSS cwe XOYN 55 SS VALUE x X Xu Ka S GNE ISEN X X TC OUTPUT 5 SA E SY m VON SS SS VALDE x X Ku NSW IM X X XM TC OUTPUT SS SS SE diu SY ar YEA SG TN am s Mode U Waveforms 65 D 16 Mode X waveform Hardware Triggered Delayed Pulse One Shot with Edge Disarm Mode X is identical to Mode L except that the counter will be disarmed while an inactive going Gate edge is applied to the counter And the counter will hold the count value until it is issued a LOAD command or REST command SOURCE TSS ESSEN N VALUE GEN UT ED CFG ee Cs QE X EKEKA ae TC OUTPUT SS SS SS X 55 X SOURCE SS 55 ga NNN 55 We a PE x X Xu X XSSX X X X X SS X so X N TC OUTPUT SS SS man SA SS SOURCE SS om WW 55 m TC OUTPUT TC TOGGLED OUTPUT SS Mode X Waveforms 66
43. s to the PCI 1780 via the I O connector 3 2 Switch and Jumper Settings The PCI 1780 card has one function switch and five jumper settings PCI 1780 REV Fig 3 1 Card connector jumper and switch locations 19 Board ID setting SW1 Board ID 10 11 12 13 14 15 IDO ID1 ID2 ID3 Note On 1 Off 0 20 3 3 Signal Connections Pin Assignment Figure 3 2 shows the pin assignments for the 68 pin I O connector on the PCI 1780 GND 68 34 FOUT3 GND 67 33 FOUT2 GND 66 32 FOUTI GND 65 31 FOUTO GND 64 30 OUT7 GND 63 29 OUT6 GND 62 28 10015 GND 61 27 OUT4 GND 60 26 OUT3 GND 59 25 OUT2 GND 58 24 OUTI GND 57 23 OUTO DO7 56 22 DO6 DOS 55 21 DO4 DO3 54 20 DO2 DO1 53 19 100 SV 52 18 5V DI7 51 17 016 DIS 50 16 IDH 49 15 DR 48 14 DIO GND 47 13 EXT CLK GATE7 46 12 GATES 45 11 GATE4 GATE3 44 10 2 GATE1 43 9 GND 42 8 CLK7 GND 41 7 CLK6 GND 40 6 5 GND 39 5 CLK4 GND 38 4 CLK3 GND 37 CLK2 GND 36 2 GEK GND 35 1 CLKO HA Fig 3 2 I O connector pin assignments for the PCI 1780 21 I O Connector Signal Description Table 3 2 I O connector signal descriptions Signal Name Reference Direction Description GND DC ground 5V GND Outp
44. the example codes included on the companion CD ROM 1 5 Device Drivers Programming Roadmap This section will provide you a roadmap to demonstrate how to build an application from scratch using Advantech Device Drivers with your favorite development tools such as Visual C Visual Basic Delphi and C Builder The step by step instructions on how to build your own applications using each development tool will be given in the Device Drivers Manual Moreover a rich set of example source code is also given for your reference Programming Tools Programmers can develop application programs with their favorite development tools Visual C Visual Basic 3 Delphi C Builder For instructions on how to begin programming works in each development tool Advantech offers a Tutorial Chapter in the Device Drivers Manual for your reference Please refer to the corresponding sections in this chapter of the Device Drivers Manual to begin your programming efforts You can also look at the example source code provided for each programming tool since they can get you very well oriented The Device Drivers Manual can be found on the companion CD ROM Or if you have already installed the Device Drivers on your system The Device Drivers Manual can be readily accessed through the Start button Start Programs Advantech Driver V2 0a Device Driver Manual The example source codes could be found under the corresponding installation folde
45. tions for Driver Setup For further information on driver related issues an online version of Device Drivers Manual is available by accessing the following path Start Programs Advantech Device Drivers V2 0a Device Driver Manual 2 3 Hardware Installation Note Make sure you have installed the driver first before you install the card please refer to 2 2 Driver Installation After the DLL driver installation is completed you can now go on to install the PCI 1780 card in any PCI slot on your computer But it is suggested that you should refer to the computer user manual or related documentation if you have any doubt Please follow the steps below to install the card on your system 12 Step 1 Turn off your computer and unplug the power cord and cables TURN OFF your computer before installing or removing any components on the computer Step 2 Remove the cover of your computer Step 3 Remove the slot cover on the back panel of your computer Step 4 Touch the metal part on the surface of your computer to neutralize the static electricity that might be on your body Step 5 Insert the PCI 1780 card into a PCI slot Hold the card only by its edges and carefully align it with the slot Insert the card firmly into place Use of excessive force must be avoided otherwise the card might be damaged Step 6 Fasten the bracket of the PCI card on the back panel rail of the computer with screws Step 7 Connect appropriate access
46. ut 5 source FOUT lt 0 3 gt GND Output Frequency output channels OUT lt 0 7 gt GND Output Counter output channels DO lt 0 7 gt GND Output Digital output channels EXT_CLK GND Input External clock input CLK lt 0 7 gt GND Input Clock input channels lt 0 7 gt GND Input Gate control channels DI lt 0 7 gt GND Input Digital input channels 22 Period measurement This approach is a particular fit for a low frequency signal Counter 1 GATE OUT GATE OUT Unknown Signal Standard Clock Figure 3 3 Period measurement Implementing this measurement needs two counters One for the up cycle period and another for the down cycle period These added together gives the total period The duty cycle can also be calculated by the up period being divided by the total period Connect the unknown signal to each counter s Gate Apply a standard clock pulse to each counter Counter 0 counts the up cycle Counter I counts the down cycle In PCI 1780 wiring is simple Only connect the unknown signal to counter 0 and use the register to select the gate source Counter 0 select the Gate N counter I select the Gate N 1 Apply the standard clock to both counters by clock source select register It can change the clock for different measurement range Counter 0 set as Mode O and gate polarity is positive Counter 1 set as Mode O and gate polarity is negative 23 Frequency measurement This approac
Download Pdf Manuals
Related Search
Related Contents
Variable Displacement Vane Pumps: Installation Manual Samsung Galaxy Grand Prime Lietotāja rokasgrāmata 30” Freestanding Electric Range SERVICE MANUAL Invacare® Storm - Sanitätshaus Hofmann Sony VAIO SVE1513BCX South Shore Furniture 9026691 Instructions / Assembly Samsung HMX-U10UP/U100UP Camcorder User Manual MANUAL DE INSTRUCCIONES ET-NXP-ARM-KIT-LPC1768 EN Copyright © All rights reserved.
Failed to retrieve file