Advertisement

Quick Links

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, please 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. 2003178000
Printed in Taiwan
i
1st Edition
Dec 2002

Advertisement

Table of Contents
loading

Summary of Contents for Advantech PCI-1780

  • Page 1 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.
  • Page 3: Table Of Contents

    Contents 1. INTRODUCTION........................1 1.1 F ........................1 EATURES 1.2 A ......................... 3 PPLICATIONS 1.3 I ...................... 3 NSTALLATION UIDE 1.4 S ..................... 5 OFTWARE VERVIEW 1.5 D ..............6 EVICE RIVERS ROGRAMMING OADMAP 1.6 A ........................8 CCESSORIES 2. INSTALLATION........................9 2.1 U ........................
  • Page 4 C.10 C — BASE+44H ................44 LEAR INTERRUPT C.11 D — BASE+48H................44 IGITAL OUTPUT C.12 D — BASE+48H................... 44 IGITAL INPUT C.13 B ID — BASE+4EH ..................45 OARD C.14 FOUT 0/1/2/3/4/5/6/7 — BASE + 50~5FH ..........46 CONTROL APPENDIX D.
  • Page 5: Introduction

    1. Introduction 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.
  • Page 6: Specifications

    ✓ ✓ ✓ ✓ ✓ ✓ and Hold Registers Note: Counter modes M, N, P, Q, S, T, V, W are identical to A, B, D, E, G, H, J, K. Note: ✎ For detailed specifications of the PCI-1780, please refer to Appendix A, Specifications.
  • Page 7: Applications

    PWM output ❏ Periodic interrupt generation ❏ Time-delay generation ❏ 1.3 Installation Guide Before you install your PCI-1780 card, please make sure you have the following necessary components: PCI-1780 DA&C card ❏ PCI-1780 User’s Manual ❏ Driver software Advantech DLL drivers ❏...
  • Page 8 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 & driver manual Start to write your own application Fig. 1-1 Installation Flow Chart...
  • Page 9: Software Overview

    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&C cards. Advantech’s device drivers feature a complete I/O function library to help boost your application performance. The Advantech...
  • Page 10: Device Drivers Programming Roadmap

    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.
  • Page 11 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.
  • Page 12: Accessories

    1.6 Accessories Advantech offers a complete set of accessory products to support the PCI-1780 card. These accessories include: Wiring Cable PCL-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...
  • Page 13: Installation

    This chapter gives users a package item checklist, proper instructions about unpacking and step-by-step procedures for both driver and card installation. 2.1 Unpacking After receiving your PCI-1780 package, please inspect its contents first. The package should contain the following items: PCI-1780 card Companion CD-ROM (DLL driver included) User’s Manual...
  • Page 14 Also, pay extra caution to the following aspects to ensure proper installation: Avoid physical contact with materials that could hold static electricity such as plastic, vinyl and Styrofoam. 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.
  • Page 15: Driver Installation

    2.2 Driver Installation We recommend you to install the driver before you install the PCI-1780 card 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&C card package.
  • Page 16: Hardware Installation

    (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.
  • Page 17 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.
  • Page 18 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.
  • Page 19: Device Setup & Configuration

    2.4 Device Setup & 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.
  • Page 20 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.
  • Page 21 Fig. 2-6 The Device Name appearing on the list of devices box Note: ✎ As we have noted, the device name “001:<PCI-1780 BoardID=7 I/O=c800H>” 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.
  • Page 23: Signal Connections

    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. Fig. 3-1 Card connector, jumper and switch locations...
  • Page 24 Board ID setting (SW1) Board ID Note: On: 1, Off: 0...
  • Page 25: Signal Connections

    PCI-1780. FOUT3 FOUT2 FOUT1 FOUT0 OUT7 OUT6 OUT5 OUT4 OUT3 OUT2 OUT1 OUT0 EXT_CLK GATE7 GATE6 GATE5 GATE4 GATE3 GATE2 GATE1 GATE0 CLK7 CLK6 CLK5 CLK4 CLK3 CLK2 CLK1 CLK0 Fig. 3-2 I/O connector pin assignments for the PCI-1780...
  • Page 26 I/O Connector Signal Description Table 3-2 I/O connector signal descriptions Signal Name Reference Direction Description DC ground Output +5 V source FOUT<0..3> Output Frequency output channels OUT<0..7> Output Counter output channels DO<0..7> Output Digital output channels EXT_CLK Input External clock input CLK<0..7>...
  • Page 27 Gate. Apply a standard clock pulse 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.
  • Page 28: Frequency Measurement

    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.
  • Page 29: Appendix A. Specifications

    Appendix A. Specifications Programmable Counter Channels 8 (independent) Resolution 16-bit Programmable 8 independent Clock Source Programmable Counter Modes Max. Frequency 20 MHz Interrupt source 8 counter outputs Digital Input/Output Input Channels 0.8 V max. Input Voltage High 2.4 V min. Interrupt source Channel 0 Output Channels...
  • Page 31: Appendix B. Block Diagram

    Appendix B. Block Diagram Output DO 0~7 Buffer Address Address Bus Decoder Input DI 0~7 Buffer DI 0 Interrupt Control Logic Data Bus (D0~D15) 16-bit Counter Out 0~7 Interface Gate Control Logic Gate 0~7 Clock 0~7 Clock Source 10 MHz Select Logic Clock...
  • Page 33: Appendix C. Register Structure And Format

    For example, BASE+0 is the card's base address 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.
  • Page 34 Table C-1 PCI-1780 register format (Part 1) Base PCI-1780 Register Format Address + HEX Counter 0 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 Counter 0 Load CL15 CL14 CL13 CL12 CL11 CL10 Counter 0 Hold CH15 CH14 CH13 CH12 CH11 CH10...
  • Page 35 Table C-1 PCI-1780 register format (Part 2) Base PCI-1780 Register Format Address + HEX Counter 2 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 Counter 2 Load CL15 CL14 CL13 CL12 CL11 CL10 Counter 2 Hold CH15 CH14 CH13 CH12 CH11 CH10...
  • Page 36 Table C-1 PCI-1780 register format (Part 3) Base PCI-1780 Register Format Address + HEX Counter 4 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 Counter 4 Load CL15 CL14 CL13 CL12 CL11 CL10 Counter 4 Hold CH15 CH14 CH13 CH12 CH11 CH10...
  • Page 37 Table C-1 PCI-1780 register format (Part 4) Base PCI-1780 Register Format Address + HEX Counter 6 Mode CM15 CM14 CM13 CM12 CM11 CM10 CM9 Counter 6 Load CL15 CL14 CL13 CL12 CL11 CL10 Counter 6 Hold CH15 CH14 CH13 CH12 CH11 CH10...
  • Page 38 Table C-1 PCI-1780 register format (Part 5) Base PCI-1780 Register Format Address + HEX Command Enable CE7 CE6 CE5 Interrupt Control Interrupt Status Clear Interrupt Digital Output DO7 DO6 DO5 DO4 DO3 DO2 DO1 Digital Input Board ID...
  • Page 39 Table C-1 PCI-1780 register format (Part 6) Base PCI-1780 Register Format Address + HEX FOUT 0 Control FOUT 1 Control FOUT 2 Control FOUT 3 Control FOUT 4 Control FOUT 5 Control FOUT 6 Control FOUT 7 Control...
  • Page 40: Counter 0/1/2/3/4/5/6/7 Mode - Base+00/08/10/18/20/28/30/38H

    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. Counter 0 Mode 00H W CM15 CM14 CM13 CM12 CM11 CM10 CM9 Counter 1 Mode 08H W CM15 CM14 CM13 CM12 CM11 CM10 CM9...
  • Page 41 Count control (reload) Reload from LOAD register Reload from LOAD or HOLD register Count control (special gate) Disable special gate Enable special gate Count control (special gate) Count on rising edge Count on falling edge CM11 ~ CM8 Count source selection 0000 Internal clock 0001...
  • Page 42 CM14 Gating polarity selection High level for level active, rising edge for edge active Low level for level active, falling edge for edge active CM15 Gate active edge or level Level active Edge active...
  • Page 43: Counter 0/1/2/3/4/5/6/7 Load - Base+02/0A/12/1A/22/2A/32/3Ah

    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. Counter 0 Load 02H W CL15 CL14 CL13 CL12 CL11 CL10 Counter 1 Load 0AH W CL15 CL14 CL13 CL12 CL11 CL10 Counter 2 Load...
  • Page 44: Counter 0/1/2/3/4/5/6/7 Hold - Base+04/0C/14/1C/24/2C/34/3Ch

    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. Counter 0 Hold 04H W CH15 CH14 CH13 CH12 CH11 CH10 Counter 1 Hold 0CH W CH15 CH14 CH13 CH12 CH11 CH10 Counter 2 Hold...
  • Page 45: Counter 0/1/2/3/4/5/6/7 Command - Base+06/0E/16/1E/26/2E/36/3Eh

    C.6 Counter 0/1/2/3/4/5/6/7 command — BASE+06/0E/16/1E/26/2E/36/3EH Table C-5 PCI-1780 Register for counter 0/1/2/3/4/5/6/7 command Base Addr. Counter 0 Command 06H W Counter 1 Command 0EH W Counter 2 Command 16H W Counter 3 Command 1EH W Counter 4 Command 26H W...
  • Page 46: Command Enable - Base+40H

    C.7 Command enable — BASE+40H Table C-6 PCI-1780 Register for command enable Base Addr. Command enable 40H W CE7 CE6 CE5 Counter command enable bit (n: 0 ~ 7) Don’t select this counter Select the counter...
  • Page 47: Interrupt Control - Base+42H

    C.8 Interrupt control — BASE+42H Table C-7 PCI-1780 Register for interrupt control Base Addr. Interrupt control 42H W Counter interrupt enable bit (n: 0 ~ 7) Disable interrupt for this counter Enable interrupt for this counter Interrupt enable bit Disable interrupt for DI0 Enable interrupt for DI0 C.9 Interrupt status —...
  • Page 48: Clear Interrupt - Base+44H

    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 Addr. Clear interrupt 44H W C.11 Digital output — BASE+48H Table C-10 PCI-1780 Register for digital output Base Addr.
  • Page 49: Board Id - Base+4Eh

    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 Base Addr.
  • Page 50: Fout 0/1/2/3/4/5/6/7 Control - Base + 50~5Fh

    C.14 FOUT 0/1/2/3/4/5/6/7 control — BASE + 50~5FH Table C-13 PCI-1780 Register for FOUT 0/1/2/3/4/5/6/7 Control Base Addr. FOUT 0 Control 50H W FOUT 1 Control 52H W FOUT 2 Control 54H W FOUT 3 Control 56H W FOUT 4 Control...
  • Page 51 FS2 ~ FS0 FOUT source External clock CLK N FOUT N-1 10 MHz clock 1 MHz clock 100 KHz clock 10 KHz clock 1 KHz clock FOUT output enable Disable Enable...
  • Page 53: Appendix D. Waveform Of Each Mode

    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 CM15-CM12 and CM6-CM4 select the operating mode for each counter (see Table D-1).
  • Page 54 TC is terminated. Counter mode table: (N: No gate control, L: Level gate control, E: Edge gate control) Table D-1 PCI-1780 counter mode Counter Mode Special Gate (CM6) Reload Source (CM5) Repetition (CM4)
  • Page 55: Mode Awaveform

    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.
  • Page 56: Mode Bwaveform

    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.
  • Page 57: Mode Cwaveform

    D.3 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.
  • Page 58: Mode Dwaveform

    D.4 Mode 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;...
  • Page 59: Mode Ewaveform

    D.5 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.
  • Page 60: Mode Fwaveform

    D.6 Mode F waveform Non-Retriggerable One-Shot Mode F provides a non-retriggerable one-shot timing function. The counter 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.
  • Page 61: Mode Gwaveform

    D.7 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.
  • Page 62: Mode Hwaveform

    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.
  • Page 63: Mode Iwaveform

    D.9 Mode I waveform Hardware-Triggered Delayed Pulse Strobe Mode 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.
  • Page 64: Mode Jwaveform

    D.10 Mode J waveform 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.
  • Page 65: Mode Kwaveform

    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.
  • Page 66: Mode Lwaveform

    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.
  • Page 67: Mode Owaveform

    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.
  • Page 68: Mode Rwaveform

    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.
  • Page 69: Mode Uwaveform

    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 is applied to the counter. And the counter will hold the count value until it is issued a LOAD command or REST command.
  • Page 70: Mode Xwaveform

    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.

Table of Contents