# cPCI/PCI-8554/R®

# Multi-functions

# Counter / Timer Card

# User’s Guide

©Copyright 1998\~2002 ADLINK Technology Inc,

All Rights Reserved.

Manual Rev. 1.02: July 31, 2002

Part No: 50-11130-100

The information in this document is subject to change without prior notice in order to improve reliability, design and function and does not represent a commitment on the part of the manufacturer.

In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.

This document contains proprietary information protected by copyright. All rights are reserved. No part of this manual may be reproduced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.

# Trademarks

NuDAQ, DAQBench are registered trademarks of ADLINK Inc.,

Other product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies.

# Getting service from ADLINK

Customer Satisfaction is the most important priority for ADLINK Tech Inc. If you need any help or service, please contact us.

<table><tr><td colspan="4">ADLINK Technology Inc.</td></tr><tr><td>Web Site</td><td colspan="3">http://www.adlinktech.com</td></tr><tr><td>Sales &amp; Service</td><td colspan="3">Service@adlinktech.com</td></tr><tr><td rowspan="4">Technical Support</td><td>NuDAQ + USBDAQ</td><td colspan="2">nudaq@adlinktech.com</td></tr><tr><td>Automation</td><td colspan="2">automation@adlinktech.com</td></tr><tr><td>NuIPC</td><td colspan="2">nuipc@adlinktech.com</td></tr><tr><td>NuPRO / EBC</td><td colspan="2">nupro@adlinktech.com</td></tr><tr><td>TEL</td><td>+886-2-82265877</td><td>FAX</td><td>+886-2-82265717</td></tr><tr><td>Address</td><td colspan="3">9F, No. 166, Jian Yi Road, Chungho City, Taipei, 235 Taiwan.</td></tr></table>

Please email or FAX us of your detailed information for a prompt, satisfactory and constant service.

<table><tr><td colspan="4">Detailed Company Information</td></tr><tr><td>Company/Organization</td><td colspan="3"></td></tr><tr><td>Contact Person</td><td colspan="3"></td></tr><tr><td>E-mail Address</td><td colspan="3"></td></tr><tr><td>Address</td><td colspan="3"></td></tr><tr><td>Country</td><td colspan="3"></td></tr><tr><td>TEL</td><td></td><td>FAX</td><td></td></tr><tr><td>Web Site</td><td colspan="3"></td></tr><tr><td colspan="4">Questions</td></tr><tr><td>Product Model</td><td colspan="3"></td></tr><tr><td>Environment to Use</td><td colspan="3">OS:Computer Brand:M/B: CPU:Chipset: BIOS:Video Card:Network Interface Card:Other:</td></tr><tr><td>Detail Description</td><td colspan="3"></td></tr><tr><td>Suggestions to ADLINK</td><td colspan="3"></td></tr></table>

# Table of Contents

# Tables............ iii

# Figures ....... . iv

# How to Use This Guide....... ... v

# Chapter 1 Introduction ......

1.1 Features . 2
1.2 Applications . 3
1.3 Specifications .. 3
1.4 Software Supporting .. 5

1.4.1 Programming Library . 5
1.4.2 PCIS-LVIEW: LabVIEW® Driver .... 6
1.4.3 PCIS-VEE: HP-VEE Driver .. 6
1.4.4 DAQBenchTM: ActiveX Controls.. 6

# Chapter 2 Getting Started ...... . 7

2.1 What You Have ..
2.2 Unpacking.. /
2.3 PCB Layout of cPCI/PCI-8554/R. .8
2.4 Default Jumper Setting . .9
2.5 cPCI/PCI-8554/R Installation. .11

2.5.1 Hardware configuration.. .11

2.6 Device Installation for Windows Systems .. .12
2.7 Pin Assignment of Connector . .13
2.8 Clock System.. .15
2.9 Counters Architecture. . 15

2.9.1 Independent Counters (Counter 1\~10) . ..17
2.9.2 Cascaded Counters .. .17
2.9.3 User Configurable Cascaded Counters .. ..18

2.10 Clock Source Configurations.. .19
2.11 Gate Control Configurations.. ..20
2.12 Counter Outputs.. . 20
2.13 Debounce System.. .21
2.14 Interrupt System.. . 22
2.15 Digital Input and Output . . 23
2.16 12V and 5V Power Supply . .. 24

# Chapter 3 Registers ......... .. 25

3.1 PCI PnP Registers... .25
3.2 I/O Address Map.. .. 26
3.3 Timer/Counter Registers . .27
3.4 Timer / Counter Clock Mode Control .. ..27
3.5 Digital Input Register . . 28
3.6 Digital Output Register . .29

# Chapter 4 Signal Connections & Applications.................... 30

4.1 Connectors Pin Assignment . .. 30
4.2 Digital I/O Connection.. ..30
4.3 Timer/Counter Connection.. .31
4.4 Frequency Generator . ..32

4.4.1 To generate a 250 KHz Square Wave. .. . 32

4.4.2 To generate a 1 pulse/1 hour signal . . 33

4.5 Pulse Width Measurement.. .34
4.6 Frequency Measurement.. .. 35
4.7 Event Counter... .37
4.8 Dual Interrupt System.. ..38

# Chapter 5 C/C++ Library .......... .. 39

5.1 Libraries Installation.. ..39
5.2 Programming Guide . .. 40

5.2.1 Naming Convention .. ..40
5.2.2 Data Types .. ..40
5.3 \_8554\_Initial .. ..41
5.4 \_8554\_Write\_Counter . .. 42
5.5 \_8554\_Read\_Counter .. .. 43
5.6 \_8554\_Stop\_Counter . .. 44
5.7 \_8554\_Read\_Status.. .. 45
5.8 \_8554\_DO ... .. 46
5.9 \_8554\_DI.. ..47
5.10 \_8554\_SET\_cntCLK . .. 48
5.11 \_8554\_SET\_CK1.. ..49
5.12 \_8554\_SET\_DBCLK . ..50
5.13 \_8554\_Set\_INT\_Control .. .. 51
5.14 \_8554\_Get\_IRQ\_Status. . 52
5.15 \_8554\_INT\_Enable . .53
5.16 \_8554\_INT\_Disable .. . 54
5.17 \_8554\_CLR\_IRQ1 . ..54
5.18 \_8554\_CLR\_IRQ2 . .. 55

# Warranty Policy .......... .... 56

# Tables

Table 1. Default Jumper Settings on PCI-8554 . .. 10

Table 2. Extra Default Jumper Setting on cPCI-8554/R... 10

Table 3. Counters label relationship . . 15

Table 4. I/O Address Map of cPCI/PCI-8554/R . . 26

Table 5. Timer/Counter Registers... . 27

Table 6. Timer/Counter Clock Mode Control Register ... . 28

Table 7. Digital Input Register .. . 28

Table 8. Digital Output Register... . 29

Table 9. Data types and their ranges. . 40

# Figures

Figure 1: Functional Block diagram.. 2
Figure 2: PCB Layout of PCI-8554.. 8
Figure 3: PCB Layout of cPCI-8554/R .. 9
Figure 4: Pin Assignment of PCI-8554 Connector CN1 . . 13
Figure 5: Pin Assignment of cPCI-8554/R Connector CN1.. . 14
Figure 6: Block Diagram of 8254 Counter.. . 16
Figure 7: Default Counters Architectural. . 16
Figure 8: Example of ‘independent counters’. . 17
Figure 9: JP14/JP15 (For cPCI-8554/R only).. . 17
Figure 10: Cascaded Counter Configuration.. . 18
Figure 11: User Programmable Cascaded Counters .. . 18
Figure 12: Clock Source of Counter n.. . 19
Figure 13: Clock Source of CK1 . 19
Figure 14: Gate source of counter 1 \~ 10 .. . 20
Figure 15: Structure of JP1 \~ JP11.. . 21
Figure 16: Clock Source of DB\_CLK . . 21
Figure 17: Basic Timing of the debounce system . . 22
Figure 18: Dual Interrupt System of cPCI/PCI-8554/R. . 22
Figure 19: Digital I/O Connection.. .. 30
Figure 20: Example of a frequency generator (1).. . 32
Figure 21: Example of frequency generator (2)... . 33
Figure 22: Example of pulse width measurement . . 34
Figure 23: Example of frequency measurement (1).. .. 36
Figure 24: Example of event counter .. . 37
Figure 25: Example of dual interrupt system.. . 38

# How to Use This Guide

This manual is designed to help you use the cPCI/PCI-8554/R. The manual describes how to modify various settings on the cPCI/PCI-8554/R card to meet your requirements. It is divided into 5 chapters:

Chapter 1, “Introduction,” gives an overview of the product features, applications, and specifications.

Chapter 2, “Installation & Configurations” describes the operation method and multi-functions of the cPCI/PCI-8554/R. Users should read through this chapter to understand the configurations of the cPCI/PCI-8554/R. The chapter will also outline how to install the cPCI/PCI-8554/R.

Chapter 3, “Registers,” describes the details of each register of the cPCI/PCI-8554/R; this information will assist programmers who want to control the hardware with low-level programming.

Chapter 4, “Signal Connection & Applications,” describes the connectors' pin assignment and how to connect the outside signal and devices to / from the cPCI/PCI-8554/R. Some applications also are introduced.

Chapter 5, “High-level Programming,” introduces the Clanguage library for operating the cPCI/PCI-8554/R. Some examples are shown too.

#

# Introduction

cPCI/PCI-8554/R is a general-purpose counter / timer and digital I/O card. The card is designed with four 8254, a programmable interval timer/counter chip, totally, providing twelve 16-bit down counter or frequency dividers. Three different types of interface are available: PCI (PCI-8554), CompactPCI (cPCI-8554), and CompactPCI with rear I/O connection (cPCI-8554R) for various platforms and applications.

The card has multi-configurations. Its counters can be set in an independent or cascaded configuration. The gate controls for the counter can come from either the internal default enable signal or from external sources. The clock source of the counters can be set from an internal or external clock source, when an external clock source is used, users can configure the jumper as to disable or enable the debounce function.

The card also provides digital input and output ports. There are 8 digital output and 8 digital input channels, which can be used to control or monitor external devices.

The cPCI/PCI-8554/R provides an interrupt signal, which is generated by the counter output. External interrupt signals can also be used. The interrupt can be used for watchdog timers or others applications. The maximum interrupt time interval can be 536 seconds.

The I/O signals are provided via the 100-pin SCSI-II connector. Figure 1 shows the functional block diagram of the cPCI/PCI-8554/R. The cPCI/PCI-8554/R uses ASIC PCI controller to interface the board to the PCI bus. The ASIC fully implements the PCI local bus specification Rev 2.1. The BIOS software automatically controls all bus relative configurations, such as base memory and interrupt assignment. This removes the burden of searching for a conflict, which can be very time consuming and difficult with some bus standards.

![Based on the provided block diagram, here is the accurate description of the labeled blocks and their connections:\n\n**Labeled Blocks:**\n*   **PCI Bus** (Vertical trapezoid on the far left)\n*   **PCI Controle** (Central square block)\n*   **Interrupt system** (Rectangular block below PCI Controle)\n*   **clock system** (Small rectangular block at the bottom left)\n*   **8 bits input/output** (Rectangular block, top row on the right)\n*   **8254 chip #1** (Rectangular block below input/output)\n*   **8254 chip #2** (Rectangular block below chip #1)\n*   **8254 chip #3** (Rectangular block below chip #2)\n*   **8254 chip #4** (Rectangular block below chip #3)\n*   **Debounce system** (Rectangular block at the bottom right)\n*   **100 pin SCSI -** (Vertical trapezoid on the far right)\n\n**Connections:**\n*   **PCI Bus** connects bidirectionally to **PCI Controle** with labels:\n    *   **data bus**\n    *   **Address bus**\n    *   **Interru**\n*   **PCI Controle** connects bidirectionally to **Interrupt system**.\n*   **clock system** sends signals to **Interrupt system** (arrow up) and **Debounce system** (arrow right).\n*   **PCI Controle** connects bidirectionally to:\n    *   **8 bits input/output**\n    *   **8254 chip #1**\n    *   **8254 chip #2**\n    *   **8254 chip #3**\n    *   **8254 chip #4**\n*   **Interrupt system** sends a signal labeled **COUT12** to **8254 chip #4**.\n*   The blocks on the right side connect to **100 pin SCSI -**:\n    *   **8 bits input/output** outputs **8** (upward arrow) and **8** (downward arrow).\n    *   **8254 chip #1** outputs **COUT1 ~ COUT3** and **GATE1 ~ GATE3**.\n    *   **8254 chip #2** outputs **COUT4 ~ COUT6** and **GATE4 ~ GATE6**.\n    *   **8254 chip #3** outputs **COUT7 ~ COUT9** and **GATE7 ~ COUT9**.\n    *   **8254 chip #4** outputs **COUT10 ~ COUT12** and **GATE10 ~**.\n    *   **Debounce system** outputs **ECLK1 ~ ECLK10** and **E_INT**.](.cpci-8554-r-manual-4-en/cc27c76327dde70b654c5ef55400c6eaf6cf73e2c038c88e9736ca432e1f0dac.jpg)

Figure 1: Functional Block diagram

# 1.1 Features

The cPCI/PCI-8554/R Counter / Timer and digital I/O Card provides the following advanced features:

• Four 8254 chips provide twelve 16 bits down counters
Multi-configurations of counters / timers:
Flexible setting for each independent counter, the clock source could be external, internal or cascaded. The gate signal is external controlled or internal enabled.
Provide debounce function with flexible setting to prevent from bounce phenomenon when using external clocks.
• 8 digital output channels
• 8 digital input channels
Dual interrupt sources
3 From output of counter #12, or
3 From external source.
100-pin SCSI-II female connector.
• PCI-Bus

# 1.2 Applications

• Event counter
Frequency generator
Frequency synthesizer
Pulse width measurement
• Low level pulse generator
Time delay
Industry automation
Watchdog timer

# 1.3 Specifications

# Programmable Counter / Timer

Device: 82C54x4
Number of Counters/timers:
3 10 independent timers / counters
3 2 cascaded timers / counters
3 Cascaded 32-bit counters with fixed 8MHz internal clock

• Counter mode: 16-bit down counter

Maximum input frequency: 8 MHz

Clock sources of independent counters:

3 External clock
3 Prior counter output
3 Clock #10 output
3 CK1 (Programmable)

CK1 clock sources: (Programmable)

3 8MHz internal base clock
3 Programmable counter 11 output

Gate control: default enable or external control

# Digital Filter Circuits

Device: MC14490
De-bounce clock: (Programmable)
3 8MHz internal base clock
3 Programmable counter 11 output

# Digital I/O (DIO)

• No. of input channels : 8 channels
No. of output channels : 8 channels (dedicated output)
Characteristics: TTL compatible signal

# General Specifications

Connector: 100-pin SCSI-II female connector
Operating Temperature: 0°C \~ 60°C
Storage Temperature: -20°C \~ 80°C
• Humidity: 5 \~ 95%, non-condensing
• Power Consumption: +5 V @ 350 mA typical
Dimension: 134mm(L) X 107mm(W)

# 1.4 Software Supporting

ADLINK provides versatile software drivers and packages for users’ different approach to building a system. ADLINK not only provides programming libraries such as DLL for most Windows based systems, but also provide drivers for many other software packages such as LabVIEW®, HP VEETM, DASYLabTM, InTouchTM, InControlTM, ISaGRAFTM, and so on.

All software options are included in the ADLINK CD. Non-free software drivers are protected with licensing codes. Without the software code, you can install and run the demo version for two hours for trial/demonstration purposes. Please contact ADLINK dealers to purchase the formal license.

# 1.4.1 Programming Library

For customers who are writing their own programs, we provide function libraries for many different operating systems, including:

DOS Library: Borland C/C++ and Microsoft C++, the functional descriptions are included in this user’s guide.

Windows 95 DLL: For VB, VC++, Delphi, BC5, the functional descriptions are included in this user’s guide.

PCIS-DASK: Include device drivers and DLL for Windows 98, Windows NT and Windows 2000. DLL is binary compatible across Windows 98, Windows NT and Windows 2000. This means all applications developed with PCIS-DASK are compatible with Windows 98, Windows NT and Windows 2000. The developing environment can be VB, VC++, Delphi, BC5, or any Windows programming language that allows calls to a DLL. The user’s guide and function reference manual of PCIS-DASK are included in the CD. Please refer to the PDF files under \\Manual\_PDF\Software\PCIS-DASK

PCIS-DASK/X: Include device drivers and shared library for Linux. The developing environment can be Gnu C/C++ or any programming language that allows linking to a shared library. The user's guide and function reference manual of D2K-DASK/X are included in the CD. (\Manual\_PDF\Software\D2K-DASK-X.)

The above software drivers are shipped with the board. Please refer to the “Software Installation Guide” for installation procedures.

# 1.4.2 PCIS-LVIEW: LabVIEW® Driver

PCIS-LVIEW contains the VIs, which is used to interface with the NI LabVIEW® software package. The PCIS-LVIEW supports Windows 95/98/NT/2000. The LabVIEW® drivers are shipped free with the board. For more information about PCIS-LVIEW, please refer to the user’s guide in the CD. (\\Manual\_PDF\Software\PCIS-LVIEW)

# 1.4.3 PCIS-VEE: HP-VEE Driver

The PCIS-VEE includes user objects, which are used to interface with the HP VEE software package. PCIS-VEE supports Windows 95/98/NT. The HP-VEE drivers are shipped free with the board. For more information about PCIS-VEE, please refer to the user’s guide in the CD. (\\Manual\_PDF\Software\PCIS-VEE)

# 1.4.4 DAQBenchTM: ActiveX Controls

We suggest customers who are familiar with ActiveX controls and VB/VC++ programming use the DAQBenchTM ActiveX Control components library for developing applications. The DAQBenchTM is designed under Windows NT/98. For more information about DAQBench, please refer to the user’s guide in the CD. (\\Manual\_PDF\Software\DAQBench\DAQBench Manual.PDF)

# 2

# Getting Started

This chapter discusses how to setup the cPCI/PCI-8554R and configure the card to meet the requirements of your application. The contents of the package and unpacking information that you should be aware off are outlined first.

# 2.1 What You Have

In addition to this User's Manual, the package should includes the following items:

cPCI/PCI-8554/R Enhanced Multi-function Counter / Timer Card
ADLINK CD
Software Installation Guide

If any of these items are missing or damaged, contact the dealer from whom you purchased the product. Save the shipping materials and carton in case you want to ship or store the product in the future.

# 2.2 Unpacking

Your cPCI/PCI-8554/R card contains electro-static sensitive components that can be easily be damaged by static electricity.

Therefore, the card should be handled on a grounded anti-static mat. The operator should be wearing an anti-static wristband, grounded at the same point as the anti-static mat.

Inspect the card module carton for obvious damages. Shipping and handling may cause damage to your module. Be sure there are no shipping and handling damages on the modules carton before continuing.

After opening the card module carton, extract the system module and place it only on a grounded anti-static surface with component side up.

Again, inspect the module for damages. Press down on all the socketed $| \check { \mathbf { C } ^ { \prime } } \mathsf { s }$ to make sure that they are properly seated. Do this only with the module placed on a firm flat surface.

Note: DO NOT APPLY POWER TO THE CARD IF IT HAS BEEN DAMAGED.

You are now ready to install your cPCI/PCI-8554/R.

# 2.3 PCB Layout of cPCI/PCI-8554/R

![PCI-B554 REV.A2\nMC14-490\n74LS273\n74LS273\n74LS244\n74LS273\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8256\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8250\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8251\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8253\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8254\n8260\nP019C60](.cpci-8554-r-manual-4-en/a49d04d8e738a1139de783b206e8b3b05db74858dc624d943ea49bd501b08b26.jpg)

Figure 2: PCB Layout of PCI-8554

![Circuit board layout diagram with labeled components and connections](.cpci-8554-r-manual-4-en/77cd7c62e07f53f313d896bbcd48d01d55dc758cad43ba17c78a0d937e65deb6.jpg)

Figure 3: PCB Layout of cPCI-8554/R

# 2.4 Default Jumper Setting

To operate the cPCI/PCI-8554/R correctly, users need to understand the structure of cPCI/PCI-8554/R and details of the possible configurations. The functional block diagram of the cPCI/PCI-8554/R is shown in figure 1 of chapter 1. The following section lists the default jumper setting on the cPCI/PCI-8554/R.

<table><tr><td>Items</td><td>Default Configuration</td><td>Set by</td></tr><tr><td>ECLK1</td><td>No Debounce function</td><td>JP1</td></tr><tr><td>ECLK2</td><td>No Debounce function</td><td>JP2</td></tr><tr><td>ECLK3</td><td>No Debounce function</td><td>JP3</td></tr><tr><td>ECLK4</td><td>No Debounce function</td><td>JP4</td></tr><tr><td>ECLK5</td><td>No Debounce function</td><td>JP5</td></tr><tr><td>ECLK6</td><td>No Debounce function</td><td>JP6</td></tr><tr><td>ECLK7</td><td>No Debounce function</td><td>JP7</td></tr><tr><td>ECLK8</td><td>No Debounce function</td><td>JP8</td></tr><tr><td>ECLK9</td><td>No Debounce function</td><td>JP9</td></tr><tr><td>ECLK10</td><td>No Debounce function</td><td>JP10</td></tr><tr><td>E_INT</td><td>No Debounce function</td><td>JP11</td></tr><tr><td>ECLK11</td><td>Internal 8MHz Clock</td><td>JP12</td></tr><tr><td>ECLK12</td><td>Output of CLK11</td><td>JP13</td></tr></table>

Table 1. Default Jumper Settings on PCI-8554

<table><tr><td>Items</td><td>Default Configuration</td><td>Set by</td></tr><tr><td>GATE11</td><td>Vcc</td><td>JP14</td></tr><tr><td>GATE12</td><td>Vcc</td><td>JP15</td></tr></table>

Table 2. Extra Default Jumper Setting on cPCI-8554/R

There are 13 jumpers available on the PCI-8554, and 15 jumpers on the cPCI-8554/R, the first 11 jumpers are used to select the debounce function. JP12 and JP13 are used for selecting the clock source for Counter No. 11 and 12. The default setting for counter No. 11 and 12 are cascaded for frequency division. Refer to section 2.9 for more details. JP14 and JP15 are used for selecting the gate voltages of counter No. 11 and 12 (only for cPCI-8554/R). Users can change the cPCI/PCI-8554/R's default configuration by setting jumpers on the card to suit the application. The card's jumpers are preset at the factory.

Before changing the default configuration, users must fully understand the operation of the debounce function. The setting and the basic operation theory are not discussed in this chapter. Refer to section 2.12 for details of the operation theory and than refer to chapter 4 for application notes.

# 2.5 cPCI/PCI-8554/R Installation

# 2.5.1 Hardware configuration

The PCI cards (or CompactPCI cards) is equipped with the plug and play PCI controller, it has the ability to request base addresses and interrupts according to the PCI standard. The systems BIOS will install the system resources based on the PCI cards’ configuration registers and system parameters (which are set by system BIOS). Interrupt assignments and memory usage (I/O port locations) of the PCI cards are also assigned by system BIOS. This system resource assignment is done on a board-byboard basis. It is not suggested to assign system resources by any other methods.

The PCI card can be inserted into any PCI slot without the need for any system resource configuration.

# 2.5.1.1 Installation Procedures

1. Turn off your computer
2. Turn off all accessories (printer, modem, monitor, etc.) connected to your computer.
3. Remove the cover from your computer.
4. Setup jumpers on the PCI or CompactPCI card.
5. Select a 32-bit PCI slot. PCI slot are shorter than ISA or EISA slots, and are usually white or ivory in color.
6. Before handling the PCI cards, discharge any static buildup on your body by touching the metal case of the computer. Hold the edge and do not touch the components.
7. Position the board into the PCI slot you selected.
8. Secure the card in place at the rear panel of the system.

# 2.6 Device Installation for Windows Systems

Once Windows 95/98/2000 has started, the Plug and Play function of the Windows OS will find the new NuDAQ/NuIPC cards. If this is the first time a NuDAQ/NuIPC cards is installed into the computer system. The Windows operating system will inform you to input the device information source. Please refer to the “Software Installation Guide” for installation procedures.

# 2.7 Pin Assignment of Connector

![(1)\n(2)\n(3)\n(51)\n(52)\n(53)\n(48)\n(49)\n(50)\n(98)\n(99)\n(100)](.cpci-8554-r-manual-4-en/c529f9fd2f0bc51b08889fda14af472351f8f7bad57c85bd95561e95675dc4ec.jpg)

<table><tr><td>(1) +12V</td><td>(26) GND</td><td>(51) GND</td><td>(76) ECLK9</td></tr><tr><td>(2) +12V</td><td>(27) GND</td><td>(52) GOUT2</td><td>(77) COUT8</td></tr><tr><td>(3) +12V</td><td>(28) GND</td><td>(53) GIN2</td><td>(78) GATE8</td></tr><tr><td>(4) Vcc</td><td>(29) GND</td><td>(54) GND</td><td>(79) ECLK8</td></tr><tr><td>(5) Vcc</td><td>(30) GND</td><td>(55) GOUT1</td><td>(80) COUT7</td></tr><tr><td>(6) Vcc</td><td>(31) GND</td><td>(56) GIN1</td><td>(81) GATE7</td></tr><tr><td>(7) NC</td><td>(32) GND</td><td>(57) E_INT</td><td>(82) ECLK7</td></tr><tr><td>(8) DI_6</td><td>(33) GND</td><td>(58) DI7</td><td>(83) COUT6</td></tr><tr><td>(9) DI_4</td><td>(34) GND</td><td>(59) DI5</td><td>(84) GATE6</td></tr><tr><td>(10) DI_2</td><td>(35) GND</td><td>(60) DI3</td><td>(85) ECLK6</td></tr><tr><td>(11) DI_0</td><td>(36) GND</td><td>(61) DI1</td><td>(86) COUT5</td></tr><tr><td>(12) DO_6</td><td>(37) GND</td><td>(62) DO7</td><td>(87) GATE5</td></tr><tr><td>(13) DO_4</td><td>(38) GND</td><td>(63) DO5</td><td>(88) ECLK5</td></tr><tr><td>(14) DO_2</td><td>(39) GND</td><td>(64) DO3</td><td>(89) COUT4</td></tr><tr><td>(15) DO_0</td><td>(40) GND</td><td>(65) DO1</td><td>(90) GATE4</td></tr><tr><td>(16) NC</td><td>(41) GND</td><td>(66) ECLK12</td><td>(91) ECLK4</td></tr><tr><td>(17) GND</td><td>(42) GND</td><td>(67) COUT12</td><td>(92) COUT3</td></tr><tr><td>(18) GND</td><td>(43) GND</td><td>(68) ECLK11</td><td>(93) GATE3</td></tr><tr><td>(19) GND</td><td>(44) GND</td><td>(69) COUT11</td><td>(94) ECLK3</td></tr><tr><td>(20) GND</td><td>(45) GND</td><td>(70) GND</td><td>(95) COUT2</td></tr><tr><td>(21) GND</td><td>(46) GND</td><td>(71) COUT10</td><td>(96) GATE2</td></tr><tr><td>(22) GND</td><td>(47) GND</td><td>(72) GATE10</td><td>(97) ECLK2</td></tr><tr><td>(23) GND</td><td>(48) GND</td><td>(73) ECLK10</td><td>(98) COUT1</td></tr><tr><td>(24) GND</td><td>(49) GND</td><td>(74) COUT9</td><td>(99) GATE1</td></tr><tr><td>(25) GND</td><td>(50) GND</td><td>(75) GATE9</td><td>(100) ECLK1</td></tr></table>

Figure 4: Pin Assignment of PCI-8554 Connector CN1

Legend:

<table><tr><td>ECLK n:</td><td>External clock source for counter #n</td></tr><tr><td>ExtG n:</td><td>External gate signal for counter #n</td></tr><tr><td>COUT n:</td><td>Counter / Timer output of counter #n</td></tr><tr><td>DO_m:</td><td>Digital output port channel #m</td></tr><tr><td>DI_m:</td><td>Digital input port channel #m</td></tr><tr><td>E_int:</td><td>External interrupt signal input</td></tr><tr><td>GOUT1:</td><td>Inverse TTL signal of GIN1</td></tr><tr><td>GOUT2:</td><td>Inverse TTL signal of GIN2</td></tr><tr><td>NC:</td><td>No Connection</td></tr></table>

![The image displays the text '(1)' on the left and '(51)' on the right. A black arc connects the area above '(1)' to the area above '(51)'. Beneath the arc are two small grey squares positioned side-by-side.](.cpci-8554-r-manual-4-en/31e83179279f9e327f0548452575a6b0d821cafc94d18e9db1032db9c7205cf6.jpg)

(1) +12V

(26) GND

(51) GND

(76) ECLK9

<table><tr><td>(2) +12V</td><td>(27) GND</td><td>(52) GOUT2</td><td>(77) COUT8</td></tr><tr><td>(3) +12V</td><td>(28) GND</td><td>(53) GIN2</td><td>(78) GATE8</td></tr><tr><td>(4) Vcc</td><td>(29) GND</td><td>(54) GND</td><td>(79) ECLK8</td></tr><tr><td>(5) Vcc</td><td>(30) GND</td><td>(55) GOUT1</td><td>(80) COUT7</td></tr><tr><td>(6) Vcc</td><td>(31) GND</td><td>(56) GIN1</td><td>(81) GATE7</td></tr><tr><td>(7) GATE12</td><td>(32) GND</td><td>(57) E_INT</td><td>(82) ECLK7</td></tr><tr><td>(8) DI_6</td><td>(33) GND</td><td>(58) DI7</td><td>(83) COUT6</td></tr><tr><td>(9) DI_4</td><td>(34) GND</td><td>(59) DI5</td><td>(84) GATE6</td></tr><tr><td>(10) DI_2</td><td>(35) GND</td><td>(60) DI3</td><td>(85) ECLK6</td></tr><tr><td>(11) DI_0</td><td>(36) GND</td><td>(61) DI1</td><td>(86) COUT5</td></tr><tr><td>(12) DO_6</td><td>(37) GND</td><td>(62) DO7</td><td>(87) GATE5</td></tr><tr><td>(13) DO_4</td><td>(38) GND</td><td>(63) DO5</td><td>(88) ECLK5</td></tr><tr><td>(14) DO_2</td><td>(39) GND</td><td>(64) DO3</td><td>(89) COUT4</td></tr><tr><td>(15) DO_0</td><td>(40) GND</td><td>(65) DO1</td><td>(90) GATE4</td></tr><tr><td>(16) GATE11</td><td>(41) GND</td><td>(66) ECLK12</td><td>(91) ECLK4</td></tr><tr><td>(17) GND</td><td>(42) GND</td><td>(67) COUT12</td><td>(92) COUT3</td></tr><tr><td>(18) GND</td><td>(43) GND</td><td>(68) ECLK11</td><td>(93) GATE3</td></tr><tr><td>(19) GND</td><td>(44) GND</td><td>(69) COUT11</td><td>(94) ECLK3</td></tr><tr><td>(20) GND</td><td>(45) GND</td><td>(70) GND</td><td>(95) COUT2</td></tr><tr><td>(21) GND</td><td>(46) GND</td><td>(71) COUT10</td><td>(96) GATE2</td></tr><tr><td>(22) GND</td><td>(47) GND</td><td>(72) GATE10</td><td>(97) ECLK2</td></tr><tr><td>(23) GND</td><td>(48) GND</td><td>(73) ECLK10</td><td>(98) COUT1</td></tr><tr><td>(24) GND</td><td>(49)GND</td><td>(74) COUT9</td><td>(99) GATE1</td></tr><tr><td>(25) GND</td><td>(50) GND</td><td>(75) GATE9</td><td>(100) ECLK1</td></tr></table>

Figure 5: Pin Assignment of cPCI-8554/R Connector CN1

# Legend:

ECLK n: External clock source for counter #n

ExtG n: External gate signal for counter #n

COUT n: Counter / Timer output of counter #n

DO\_m: Digital output port channel #m

DI\_ m: Digital input port channel #m

$E _ { - } i n t { : }$ External interrupt signal input

GOUT1: Inverse TTL signal of GIN1

GOUT2: Inverse TTL signal of GIN2

Note: pin-7and pin-16 is different from the definition in PCI-8554.

# 2.8 Clock System

The clock system of the cPCI/PCI-8554/R provides the internal clock source for the 8254 chips. The clock for counter/timer 1 \~ 10 can be one of 4 sources; an external clock source, a cascaded source from the ‘last’ channel, CK1 or COUT10. The next section will outline details on setting the clock for each counter/timer and CK1. The clock of counter/timer 11 is fixed at 8Mhz, and the clock of counter/timer 12 is connected to COUT11

# 2.9 Counters Architecture

There are four 8254 programmable timer/counter chips on the cPCI/PCI-8554/R card. Each 8254 chip contains 3 counter/timer and are labeled from 1 to 12. Counters 11 and 12 are default cascaded counters, but can be set for independent operation through jumpers JP12 & JP13. Counters 1 \~ 10 can also be set as an independent or cascaded counters. Table 3 illustrates the relationship between the reference 8254-chip label and the counter labels.

<table><tr><td>8254 Chip Label</td><td>Reference Number</td><td>Counter Label</td><td>Type of Counter</td></tr><tr><td rowspan="3">Chip 1</td><td rowspan="3">U3</td><td>Counter 1</td><td>Independent or Cascaded</td></tr><tr><td>Counter 2</td><td>Independent or Cascaded</td></tr><tr><td>Counter 3</td><td>Independent or Cascaded</td></tr><tr><td rowspan="3">Chip 2</td><td rowspan="3">U4</td><td>Counter 4</td><td>Independent or Cascaded</td></tr><tr><td>Counter 5</td><td>Independent or Cascaded</td></tr><tr><td>Counter 6</td><td>Independent or Cascaded</td></tr><tr><td rowspan="3">Chip 3</td><td rowspan="3">U5</td><td>Counter 7</td><td>Independent or Cascaded</td></tr><tr><td>Counter 8</td><td>Independent or Cascaded</td></tr><tr><td>Counter 9</td><td>Independent or Cascaded</td></tr><tr><td rowspan="3">Chip 4</td><td rowspan="3">U6</td><td>Counter 10</td><td>Independent or Cascaded</td></tr><tr><td>Counter 11</td><td>Independent or Cascaded</td></tr><tr><td>Counter 12</td><td>Independent or Cascaded</td></tr></table>

Table 3. Counters label relationship

There are three signals (2 input and 1 output) for each counter, a clock input signal, a gate control signal, and an output signal. Figure 6 illustrates the block diagram of the 8254 counter. CLK1 \~ CLK12 are clock sources, GATE1 \~ GATE12 are gate control signals and COUT1 \~ COUT12 are outputs of the counters. Figure 7 shows the inter-connection of the 8254 counters and the labels associated to each counter.

![Based on the provided image, here is an accurate and concise description of the flowchart:\n\n**Labeled Blocks:**\n*   A central rectangular box labeled '**8254 Chip**' at the top and '**Counter**' in the center.\n\n**Connections:**\n*   **'Clock Source Input'**: An arrow points from this text to the letter '**C**' on the left side of the block.\n*   **'Gate Control Input'**: An arrow points from this text to the letter '**G**' on the left side of the block.\n*   **'Counter / Timer Output'**: An arrow originates from the letter '**O**' on the right side of the block and points to this text.](.cpci-8554-r-manual-4-en/e11bd3c0f24759c753b097d3f801d3a82feda79b1e6c701259cc01c1c5d6cd93.jpg)

Figure 6: Block Diagram of 8254 Counter

![The diagram depicts a block labeled **'8254 Chip #2'**, which contains three vertically stacked sub-blocks:\n\n*   **'Counter #4'**\n*   **'Counter #5'**\n*   **'Counter #6'**\n\n**Connections:**\nEach counter block has two inputs on the left side labeled **'C'** and **'G'**, and an output on the right side.\n\n*   **For Counter #4:**\n    *   **'CLK4'** connects to **'C'**.\n    *   **'GATE4'** connects to **'G'**.\n    *   The output connects to **'COUT4'**.\n\n*   **For Counter #5:**\n    *   **'CLK5'** connects to **'C'**.\n    *   **'GATE5'** connects to **'G'**.\n    *   The output connects to **'COUT5'**.\n\n*   **For Counter #6:**\n    *   **'CLK6'** connects to **'C'**.\n    *   **'GATE6'** connects to **'G'**.\n    *   The output connects to **'COUT6'**.](.cpci-8554-r-manual-4-en/f1d5c3e69b61e933f77b4710caf87104466aebabe9518e5cde3f31e00f141104.jpg)

![The diagram depicts a rectangular block labeled **8254 Chip #1** containing three vertically stacked sections.\n\n*   **Counter #1**\n    *   Input: **CLK1** connects to port **C**.\n    *   Input: **GATE1** connects to port **G**.\n    *   Output: **COUT1**.\n*   **Counter #2**\n    *   Input: **CLK2** connects to port **C**.\n    *   Input: **GATE2** connects to port **G**.\n    *   Output: **COUT2**.\n*   **Counter #3**\n    *   Input: **CLK3** connects to port **C**.\n    *   Input: **GATE3** connects to port **G**.\n    *   Output: **COUT3**.](.cpci-8554-r-manual-4-en/ee9521d168cbee3df63664e9172d59090c3260ee64d61fb52471b341e34e0a23.jpg)

![Based on the provided image, here is the accurate and concise description of the flowchart/block diagram:\n\n**Main Component:**\n*   A large rectangular block labeled **8254 Chip #4**.\n\n**Internal Sub-Blocks:**\nInside the main block, there are three vertically stacked sections:\n1.  **Counter #10** (with inputs labeled **C** and **G**)\n2.  **Counter #11** (with inputs labeled **C** and **G**)\n3.  **Counter #12** (with inputs labeled **C** and **G**)\n\n**Inputs and Connections:**\n*   **CLK10**: Connected to the **C** input of **Counter #10**.\n*   **GATE10**: Connected to the **G** input of **Counter #10**.\n*   **8M Hz**: Connected to the **C** input of **Counter #11**.\n*   **VCC**: Connected to the **G** input of **Counter #11**.\n*   There is a vertical line on the left side that connects the **G** input of **Counter #12** to the **G** input of **Counter #11** (and the **VCC** connection).\n\n**Outputs:**\n*   **COUT10**: Output arrow from **Counter #10**.\n*   **COUT11**: Output arrow from **Counter #11**.\n*   **COUT12**: Output arrow from **Counter #12**. This output line connects back to the vertical line on the left, which is connected to the **G** inputs of **Counter #11** and **Counter #12** and the **VCC** source. (Note: The **C** input of **Counter #12** appears unconnected).](.cpci-8554-r-manual-4-en/d6a7eb7ea6f4c96023c4191f270b177d6cd47369fd44b86bc7f943a4570f9b02.jpg)

![Here is a description of the flowchart/block diagram:\n\n**Labeled Blocks:**\n*   **8254 Chip #3** (The main enclosing rectangle)\n*   **Counter #7** (Top internal section)\n*   **Counter #8** (Middle internal section)\n*   **Counter #9** (Bottom internal section)\n\n**Connections:**\n*   **Inputs (Left Side):**\n    *   **CLK7** connects to the 'C' input of Counter #7.\n    *   **GATE7** connects to the 'G' input of Counter #7.\n    *   **CLK8** connects to the 'C' input of Counter #8.\n    *   **GATE8** connects to the 'G' input of Counter #8.\n    *   **CLK9** connects to the 'C' input of Counter #9.\n    *   **GATE9** connects to the 'G' input of Counter #9.\n*   **Outputs (Right Side):**\n    *   **Counter #7** outputs to **COUT7**.\n    *   **Counter #8** outputs to **COUT8**.\n    *   **Counter #9** outputs to **COUT9**.](.cpci-8554-r-manual-4-en/8ddaa70e88b5d68192e0742a5064e603d87ec99d1d0591353d8a7658a1a513ce.jpg)

Figure 7: Default Counters Architectural

# 2.9.1 Independent Counters (Counter 1\~10)

Counters 1 to 10 are independent counters because the clock source and gate control of those counters can be set independently (Thus named Independent Counter).

![**Blocks:**\n*   A rectangular box labeled '8254 Chip #1' at the top and 'Counter #1' in the center.\n\n**Connections:**\n*   **Input:** The line labeled 'CLK1' connects to the terminal labeled 'C' on the left side of the box.\n*   **Input:** The line labeled 'GATE1' connects to the terminal labeled 'G' below 'C'.\n*   **Output:** The terminal labeled 'o' connects to the line labeled 'COUT1' extending to the right.](.cpci-8554-r-manual-4-en/f01feaab6e998f0704172177345318dc7819c2cfc262371ed6c1df43d0d90b48.jpg)

Figure 8: Example of ‘independent counters’

# 2.9.2 Cascaded Counters

The connection of Counter 11 and 12 are different from the independent counters. These two counters are cascaded counters by default settings. The clock source of counter 11 is set to the internal 8 MHz clock by JP12, while JP13 connects its output to counter 12. In fact, counter 11and 12 are designed for frequency division by using the 8254's square wave generator mode. The gates of these counters are by default tied to logic high (‘H’) to enable these counters at all times. Users can change JP14 and JP15 to tie the signal to the GATE pins.

![JP14 / JP15\nVcc\nGATE11/12\nGate of Counter\n#11 / #12](.cpci-8554-r-manual-4-en/397a393da9f3f49c623bc9c6b0d6df66fbc2ac4dd1a63dc54028d9245eaf6165.jpg)

Figure 9: JP14/JP15 (For cPCI-8554/R only)

COUT12 can precisely generate frequencies up to 2MHz and as low as 0.00186 Hz. Note that the COUT12 signal can also be used as an interrupt source. See ‘Interrupt Sources’ section for details. Figure 10 illustrates the cascaded counters - counters 11 and 12. Sometimes, you may require all 12 counters to operate independently. For such a case, you can break the default connection by reconfiguring jumpers J12 and J13. Note that both counters 11 and 12 only have 2 selectable clock sources. It can be either the 8 MHz internal clock source or an external clock source.

![8MHz\nJP12\nECLK11\nJP13\nECLK12\n8254 Chip #4\nCounter 11 O\nCounter 12 O](.cpci-8554-r-manual-4-en/d44399c6d3e76a1799de614929ecc4b53bddeceebbae8942cc3aae984f1d160f.jpg)

Figure 10: Cascaded Counter Configuration

# 2.9.3 User Configurable Cascaded Counters

Although by default there is only one cascaded counter, users can configure the independent counters to be in a cascaded arrangement by using the \_SET\_cntCLK\_ function. . Figure 11 illustrates the user programmable-cascaded counter. Refer to the next section for details of the clock source options.

![The diagram depicts a circuit involving an **8254 Chip #1**, which contains two sub-blocks: **Counter #1** and **Counter #2**.\n\n**Blocks and Inputs:**\n*   **Counter #1**:\n    *   Pin **C** is connected to **CLK1** and **GATE1**.\n    *   Pin **G** is connected to **VCC**.\n*   **Counter #2**:\n    *   Pin **C** is connected to **CLK2** and **GATE2**.\n    *   Pin **G** is connected to **VCC**.\n\n**Outputs and Connections:**\n*   **Counter #1** has an output labeled **o**, leading to the line **COUT1**.\n*   **Counter #2** has an output labeled **o**, leading to the line **COUT2**.\n*   **COUT1** and **COUT2** are connected together.\n*   This combined output line extends to the right with an arrow, labeled **Cascaded Counters Output**.\n*   A feedback loop connects this output line back to the input **CLK2**. This connection passes through a switch (depicted as two circles with a lever).\n*   The switch is labeled below with the text: selectable by function '_SET_cntCLK_' '](.cpci-8554-r-manual-4-en/4d09f71be71f6e534102c579132627432421baf189bbc91ac9c16f764797f49b.jpg)

Figure 11: User Programmable Cascaded Counters

# 2.10 Clock Source Configurations

For each independent counter, one of four different clock sources maybe selected using the software. The clock source of counter n can be either an external clock source (ECLK n), a cascaded counter output (COUTn-1), CK1 or COUT10.

# Note:

1. The clock source of cascaded counter 11 is set at C8M (8MHz) and counter 12 is set to COUT11.
2. The external clock source labelled ECK n comes from JP1 \~ JP10, see section 2.12 for details

![This diagram depicts a multiplexer or switch configuration with the following components and connections:\n\n**Labeled Blocks/Inputs:**\n*   Four input lines on the left are labeled: `ECK n`, `COUT n-1`, `CK1`, and `COUT10`. Each has an arrow pointing towards a contact node.\n\n**Connections:**\n*   A switch arm connects one of the four input contact nodes to a central node.\n*   From the central node, a single arrow points to the right, labeled `CLK n`.\n\n**Labels:**\n*   Above the switch mechanism, the text `n=1~9` is displayed.\n*   An arrow points upward toward the switch lever. Below this arrow, the text reads: `select by function` followed by `'_8554_SET_cntCLK'` on the next line.](.cpci-8554-r-manual-4-en/e738fdbd4e11eda7bf212dc185d7f83f8ea3af5020e323bbaf3cdf69165f5081.jpg)

![The image displays a logic circuit diagram representing a 4-to-1 multiplexer.\n\n**Labeled Blocks and Inputs:**\n*   Four input lines enter from the left, labeled **ECK10**, **COUT9**, **CK1**, and **C8M**.\n*   Each input line terminates at a small circle (indicating an inverter) before connecting to the multiplexer inputs.\n\n**Selection Control:**\n*   An arrow points upward into the multiplexer's switching mechanism.\n*   The text below the arrow reads: **select by function '_8554_SET_cntCLK'**.\n\n**Output:**\n*   The output of the multiplexer passes through a small circle (inverter) and exits to the right, labeled **CLK10**.](.cpci-8554-r-manual-4-en/7844f90d5a34019b49d68af9a9cf4c3003ec2653a2eded960d6c510e03ac8b03.jpg)

Figure 12: Clock Source of Counter n

![This diagram depicts a switching mechanism, likely a multiplexer, with the following components and connections:\n\n**Labeled Blocks/Text:**\n*   **C8M** (Top input label)\n*   **COUT11** (Bottom input label)\n*   **select by function**\n*   **'_8554_SET_CK1'** (The specific function controlling the switch)\n*   **CK1** (Output label)\n\n**Connections:**\n*   **C8M** connects via an arrow to the upper input terminal (small circle) of the switch.\n*   **COUT11** connects via an arrow to the lower input terminal (small circle) of the switch.\n*   An arrow originates from the text '**select by function \'_8554_SET_CK1\'**' and points upward into the switch mechanism, indicating it controls which input is selected.\n*   The switch arm connects the selected input terminal to the output terminal labeled **CK1**, which has an arrow pointing to the right.](.cpci-8554-r-manual-4-en/f5e70dc15373172131811ccb9339aad61707b9a13eafa22a2a6671f043e3e7e7.jpg)

Figure 13: Clock Source of CK1

The internal clock sources of CK1 can be either C8M or COUT11, and is selected by using the “\_8554\_SET\_CK1” function. If the counters are set in a cascaded configuration, then the clock source will be from the output of the previous counter (Counter n-1). For example, COUT1 is cascaded to CLK2; COUT3 is cascaded to CLK4 and so on. (Note: If counter 1 is set in cascaded mode, CLK1 is connected to GND because COUT0 doesn’t exist).

# 2.11 Gate Control Configurations

The gate control signals of each independent counter is internally pulled high hence they are Enabled by default if no external gate is used. When an external gate signal is used, the counters can be used for pulse width measurements. Therefore, the period of the gate signal can be precisely controlled and frequency measurement is possible. Figure 14 shows the settings for the gate signals of counters 1\~ 10. (Note: The gate signals of counter 11 and 12 are always pulled high)

![VCC\nGATE n( From 100 pin\nSCSI-II Connector )\n→ GATE n( To 8254 )](.cpci-8554-r-manual-4-en/9cdf7d458d8cf4b212aa37ea8608570d6f8a034b2bbab3fc2113d68700692279.jpg)

Figure 14: Gate source of counter 1 \~ 10

# 2.12 Counter Outputs

The clock source, gate signal and software programming controls the timer/counter output signal “COUT n”. All outputs from the 12 counters are routed to the 100-pin connector. Refer to the figure 4 and 5 for the corresponding signal pin number.

In addition, the output signal may be used as a clock source for cascaded configuration, see the above sections for details. It is possible to cascade all ten counters using the software settings, see 2.8 for reference. The output COUT12 can also be used as an internal interrupt source (refers to 'Interrupt System' for details).

# 2.13 Debounce System

The debounce system is used to eliminate the affects of bounce phenomenons. If an external clock is used, user can set JP1 \~ JP11 to select, whether or not to used the debounce system. If the debounce system is used, the debounce output signal will be in the same state as the input only if the input signal maintains the same state for four DB\_CLK cycles, otherwise the input signal will be treated as a glitch and the debounce output signal will maintain its present state, figure 15 illustrates how to set these jumpers, figure 16 illustrates how to select the DB\_CLK. Figure 17 illustrates the basic timing of the debounce system. (Note: DB\_CLK can’t be higher than 2MHz).

![**Labeled Blocks and Text:**\n*   **DB_CLK**\n*   **debounce system**\n*   **ECLK n**\n*   **JP n**\n*   **n=1~10**\n*   **ECK n**\n\n**Connections:**\n*   An arrow points from **DB_CLK** downward into the **debounce system** block.\n*   An arrow points from **ECLK n** upward into the **debounce system** block.\n*   An arrow points from the **debounce system** to the top circular terminal of the **JP n** block.\n*   An arrow points from **ECLK n** to the bottom terminal area of the **JP n** block.\n*   An arrow points from the right side of the **JP n** block to the label **ECK n**.](.cpci-8554-r-manual-4-en/b1ad27366e4ff14741273aae91e86616c472f263a81e1372ec195a002cf84f17.jpg)

![The diagram shows a logic flow involving a 'debounce system' and a connector labeled 'JP11'.\n\n**Blocks and Labels:**\n*   **debounce system** (rectangular box)\n*   **DB_CLK** (text above)\n*   **E INT** (text below)\n*   **JP11** (label above a connector symbol with three pins)\n*   **EXTINT** (text to the right)\n\n**Connections:**\n*   An arrow points from **DB_CLK** down into the top of the **debounce system**.\n*   An arrow points from **E INT** up into the bottom of the **debounce system**.\n*   A separate line from **E INT** points right into the bottom-most pin of the **JP11** connector.\n*   An arrow points from the right side of the **debounce system** to the top-most pin of the **JP11** connector.\n*   An arrow points from the **JP11** connector to the right, labeled **EXTINT**.](.cpci-8554-r-manual-4-en/b4052c85986834979fd637dbacd1d1f214d3bda0157b010f54170d9e73554ca7.jpg)

Figure 15: Structure of JP1 \~ JP11
![The diagram depicts a switching mechanism controlled by a specific function.\n\n**Labeled Blocks:**\n*   **Inputs:** 'COUT11' and '2MHz'\n*   **Output:** 'DB_CLK'\n*   **Control Label:** 'select by function '_8554_SET_DBCLK''\n\n**Connections:**\n*   The signal 'COUT11' connects to the upper input terminal of a switch.\n*   The signal '2MHz' connects to the lower input terminal of the same switch.\n*   The switch output connects to the line labeled 'DB_CLK'.\n*   An arrow originates from the text 'select by function '_8554_SET_DBCLK'' and points to the switch lever, indicating that this function determines which input connects to the output. In the diagram, the switch is drawn connecting 'COUT11' to 'DB_CLK'.](.cpci-8554-r-manual-4-en/2403457af1bcaa15ed834de95a7d5d59ccf39c6250a214c0508cd5f5f00c18a4.jpg)

Figure 16: Clock Source of DB\_CLK

![DB_CLK\ninput\nsignal\noutput\nsignal\nglitch is\neliminated](.cpci-8554-r-manual-4-en/4e8709b22ed0efb8883cd9e45a9ced1d00986157863e0a09d00cd295636bac95.jpg)

Figure 17: Basic Timing of the debounce system

# 2.14 Interrupt System

The cPCI/PCI-8554/R‘s interrupt system is a powerful and flexible system, which is suitable for many applications. The system is a Dual Interrupt System. Dual Interrupt means the hardware can generate two interrupt request signals simultaneously and the software is able to respond and invoke the ISR. Note that dual interrupt do not mean the card will occupy two IRQ levels. These two interrupt request signals INT1 and INT2 are generated by the external interrupt signal EXTINT and the timer/counter 12 output. Figure 18 shows the structure of interrupt system.

![**Labeled Blocks:**\n*   8254 Chip #4 Counter #11\n*   8254 Chip #4 Counter #12\n*   IRQ Flip-Flops (top)\n*   debounce system\n*   JP11\n*   IRQ Flip-Flops (bottom)\n*   PCI Controller\n\n**Connections:**\n*   **8MHz** and **'H'** point into **8254 Chip #4 Counter #11**.\n*   **8254 Chip #4 Counter #11** connects to **8254 Chip #4 Counter #12** (signal labeled **'H'**).\n*   **8254 Chip #4 Counter #12** outputs **COUT12** to the top **IRQ Flip-Flops**.\n*   **Clear by '8554_CLR_IRQ1'** points into the top **IRQ Flip-Flops**.\n*   The top **IRQ Flip-Flops** outputs **INT1** to the **PCI Controller**.\n*   A line connects the bottom of the top **IRQ Flip-Flops** to the right side of the bottom **IRQ Flip-Flops**.\n*   **DB_CLK** points into the **debounce system**.\n*   **E_INT** points into the **debounce system**.\n*   The **debounce system** connects to **JP11**.\n*   **EXTINT** connects **JP11** to the bottom **IRQ Flip-Flops**.\n*   **Clear by '8554_CLR_IRQ2'** points into the bottom **IRQ Flip-Flops**.\n*   The bottom **IRQ Flip-Flops** outputs **INT2** to the **PCI Controller**.\n*   The **PCI Controller** outputs **INT #A**.](.cpci-8554-r-manual-4-en/0a7f1f6a3348705db8bd315fa42bbdf3aa18fd3fbd03542592aa66b06127ce83.jpg)

Figure 18: Dual Interrupt System of cPCI/PCI-8554/R

Even though it is a dual interrupt system, only one interrupt level is ever used. The card uses the INT #A interrupt request signal on the PCI bus. The motherboards circuits will then transfer INT #A to one of the AT bus IRQ levels. The IRQ level is set by the PCI plug and play BIOS and is saved in the PCI controller. It is not necessary for users to set the IRQ level. Users can however read back the IRQ level setting by using the software library. Refer to the section 5.4.

The PCI controller of cPCI/PCI-8554/R can receive two hardware IRQ sources. However, a PCI controller can generate only one IRQ to the PCI bus, the two IRQ sources are distinguished by the ISR software. If both IRQ are in use, the application software will invoke the “\_8554\_GET\_IRQ\_Status” function to distinguish which interrupt is inserted and servicing that IRQ. Users must then clear the current IRQ to allow the next IRQ be processed.

If the application needs only one IRQ, the other IRQ source can be disabled by software. If your application does not require any IRQ sources, you can disable both interrupts. However, the PCI BIOS will still assign an IRQ level to the PCI card and hence will still occupy the PC’s resources if you only disable the IRQ sources without changing the initial conditions of the PCI controller. It is however, not recommended that the user re-design the initial condition of the PCI card with the users’ own application software. If users want to disable the IRQ level, user can use the ADLINK utility ‘INIT8554.EXE’ to change the interrupt settings.

# 2.15 Digital Input and Output

To program the digital I/O operation is fairly straightforward. The digital input operation is used for reading data from its corresponding registers, and the digital output operation is used for writing data to its corresponding registers. The digital I/O registers‘ are discussed in section 3.4 and 3.5.

# 2.16 12V and 5V Power Supply

The 100-pin SCSI-II connector provides +12 and +5 volt power sources. To avoid shorts or overloads of the power sources, thermistors are added to all power supply rails. The current rating of the +5 volt supply thermistor is 500 mA. If the load current is larger than 500mA, the resistance of the thermistors will increase due to the temperature rise. The rising resistance drops the supply voltage and hence reduces the current. If the overload or short condition is cleared, the thermistor will return to normal operation. The +12V supply thermistor also has the same current rating characteristics as the +5V supply.

# 3

# Registers

Detailed descriptions of the registers are specified in this chapter. This information is useful for programmers who wish to handle the card with low-level programming. However, we suggest users to an understanding of the PCI interface before starting any low-level programming. In addition, the contents of this chapter will also help users understand how to use the software drivers to configure this card.

# 3.1 PCI PnP Registers

This PCI card functions as a 32-bit PCI target device to any master on the PCI bus. There are three types of registers: PCI Configuration Registers (PCR), Local Configuration Registers (LCR) and cPCI/PCI-8554/R registers.

The PCR, which is PCI-bus specifications compliant, is initialized and controlled by the plug & play (PnP) PCI BIOS. Users may obtain more information on the PCI BIOS specification to better understand the operation of the PCR. Please contact PCISIG to acquire the specifications of the PCI interface.

The PCI bus controller PCI-9030/9050 is provided by PLX technology Inc. (www.plxtech.com). For more information about the LCR, please visit PLX technology’s web site to download relative information. It is not necessary for users to fully understand the details of the LCR if the software library provided is used. The PCI PnP BIOS assigns the base address of the LCR. The assigned address is located at an offset of 14h from the PCR.

The cPCI/PCI-8554/R registers are discussed in the next section. The base address, which is also assigned by the PCI PnP BIOS, is located at an offset of 18h from the PCR. Therefore, users can read the address 18h from the PCR to obtain its base address by using the BIOS function call. Do not attempt to modify the base address and interrupt that have been assigned by the PCI PnP BIOS, it may cause resource conflicts with your system.

# 3.2 I/O Address Map

All cPCI/PCI-8554/R registers are 8 bits long. Users can access these registers using 8-bit I/O instructions. The following table shows the registers address map, including descriptions and their offset addresses relative to the base address.

<table><tr><td>I/O Address</td><td>Write</td><td>Read</td></tr><tr><td>Base + 0x00 ~ 0x03</td><td>Counter 1~3 &amp; Mode Control</td><td>Counter 1 ~ 3</td></tr><tr><td>Base + 0x04 ~ 0x07</td><td>Counter 4~6 &amp; Mode Control</td><td>Counter 4 ~ 6</td></tr><tr><td>Base + 0x08 ~ 0x0B</td><td>Counter 7~9 &amp; Mode Control</td><td>Counter 7 ~ 9</td></tr><tr><td>Base + 0x0C ~0x0F</td><td>Counter 10~12 &amp; Mode Control</td><td>Counter 10 ~ 12</td></tr><tr><td>Base + 0x10 ~ 0x12</td><td>Clock Mode Control</td><td>--</td></tr><tr><td>Base + 0x18</td><td>Digital Output</td><td>Digital Input</td></tr></table>

Table 4. I/O Address Map of cPCI/PCI-8554/R

# 3.3 Timer/Counter Registers

The 8254-chips occupies 4 I/O address locations on the cPCI/PCI-8554/R as shown below. Users can refer to Tundra's or Intel's data sheet for a full description of the 8254 features available at the following websites: “http://support.intel.com/support/controllers/peripheral/231164.htm” or http://www.tundra.com (for Tundra’s 82C54 datasheet.)

Address: BASE + 0x00 \~ BASE + 0x0F

Attribute: read / write

Data Format:

<table><tr><td>Base + 0</td><td>Counter 1 Register (R/W)</td></tr><tr><td>Base + 1</td><td>Counter 2 Register (R/W)</td></tr><tr><td>Base + 2</td><td>Counter 3 Register (R/W)</td></tr><tr><td>Base + 3</td><td>8254 Mode Control Register (W)8254 Read Back Register (R)</td></tr><tr><td>Base + 4</td><td>Counter 4 Register (R/W)</td></tr><tr><td>Base + 5</td><td>Counter 5 Register (R/W)</td></tr><tr><td>Base + 6</td><td>Counter 6 Register (R/W)</td></tr><tr><td>Base + 7</td><td>8254 Mode Control Register (W)8254 Read Back Register (R)</td></tr><tr><td>Base + 8</td><td>Counter 7 Register (R/W)</td></tr><tr><td>Base + 9</td><td>Counter 8 Register (R/W)</td></tr><tr><td>Base + A</td><td>Counter 9 Register (R/W)</td></tr><tr><td>Base + B</td><td>8254 Mode Control Register (W)8254 Read Back Register (R)</td></tr><tr><td>Base + C</td><td>Counter 10 Register (R/W)</td></tr><tr><td>Base + D</td><td>Counter 11 Register (R/W)</td></tr><tr><td>Base + E</td><td>Counter 12 Register (R/W)</td></tr><tr><td>Base + F</td><td>8254 Mode Control Register (W)8254 Read Back Register (R)</td></tr></table>

Table 5. Timer/Counter Registers

# 3.4 Timer / Counter Clock Mode Control

There are a total of twenty-two bits on the cPCI/PCI-8554/R used for selecting clock sources for Timer/Counter 1 \~ 10, CK1 and the debounce system.

Address: BASE + 0x10 \~ 0x12

Attribute: write only

Data Format:

<table><tr><td>Bit</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td>0</td></tr><tr><td>Base+0x10</td><td>C4N2</td><td>C4N1</td><td>C3N2</td><td>C3N1</td><td>C2N2</td><td>C2N1</td><td>C1N2</td><td>C1N1</td></tr><tr><td>Base+0x11</td><td>C8N2</td><td>C8N1</td><td>C7N2</td><td>C7N1</td><td>C6N2</td><td>C6N1</td><td>C5N2</td><td>C5N1</td></tr><tr><td>Base+0x12</td><td>-</td><td>DBCSEL</td><td>-</td><td>CK1SEL</td><td>C10N2</td><td>C10N1</td><td>C9N2</td><td>C9N1</td></tr></table>

Table 6. Timer/Counter Clock Mode Control Register

CnN1and CnN2: These two bits are used to control clock source of Timer/Counter n, n = 1 \~ 10

CK1SEL: select source of CK1

DBCSEL: select debounce clock

# 3.5 Digital Input Register

There are 8 digital input channels on the cPCI/PCI-8554/R.

Address: BASE + 0x18

Attribute: read only

Data Format:

<table><tr><td>Bit</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td>0</td></tr><tr><td>Base+0x18</td><td>DI7</td><td>DI6</td><td>DI5</td><td>DI4</td><td>DI3</td><td>DI2</td><td>DI1</td><td>DI0</td></tr></table>

Table 7. Digital Input Register

# 3.6 Digital Output Register

This register is a general-purpose 8 bits digital output port. These signals can be used to control external devices.

Address: BASE + 0x18

Attribute: write only

Data Format:

<table><tr><td>Bit</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td>0</td></tr><tr><td>Base+0x18</td><td>DO7</td><td>DO6</td><td>DO5</td><td>DO4</td><td>DO3</td><td>DO2</td><td>DO1</td><td>DO0</td></tr></table>

Table 8. Digital Output Register

# 4

# Signal Connections & Applications

This chapter describes the connectors and applications of the cPCI/PCI-8554/R including signal connections between the cPCI/PCI-8554/R and external devices.

# 4.1 Connectors Pin Assignment

The cPCI/PCI-8554/R comes equipped with a 100-pin SCSI-II female connector (CN1). CN1 is located at the rear plate. The pin assignment of the connector is illustrated in the Figure 4 and 5 of section 2.1.

# 4.2 Digital I/O Connection

The cPCI/PCI-8554/R provides 8 digital input and 8 digital output channels through CN1. The digital I/O signals are fully TTL compatible.

![Digital Input(DI)\nFrom TTL Devices\nDigital Output (DO)\nTo TTL Devices\nGND\nCPCI/PCI-8554/R\nOutside Device](.cpci-8554-r-manual-4-en/c496f57fb2b96d91c7920915b3027345028d39fa3893741b9ca394853bd522a3.jpg)

Figure 19: Digital I/O Connection

# 4.3 Timer/Counter Connection

The cPCI/PCI-8554/R has four 8254 chips on board. It can offer 10 independent 16-bit programmable down counters with the option of cascading the counters. To implement your application, the following procedures should be followed.

1. Does the application require a fixed frequency, if answer is ‘No’, an external clock source must be used. Go to step 3.
2. Calculate the frequency of the clock according to your application requirements, then decide which clock source to use (internal, external, or cascaded), and then decide which counters to use.
3. If an external clock source is chosen, generate a clock signal external to the cPCI/PCI-8554/R card and measure its frequency. Determine whether the debounce function should be enabled or disabled, and then set JP1 \~ JP10. If reserved counters 11 and 12 are required, set JP12 and JP13 to pin 2-3.
4. Decide the gate control source: always enable or external controls, if gate control is necessary, connect the gate signal.

Note: Gate control of counter 11 and 12 are always enabled (tied to logic high) and there are no gate control pins for counters 11 and 12 on CN1.

5. Program the counter/timer using the desired mode.

# 4.4 Frequency Generator

# 4.4.1 To generate a 250 KHz Square Wave.

Step 1: Use a fixed clock source because the output is a fixed frequency.

Step 2: The internal 8MHz clock is capable of generating the 250KHz frequency. Use Counter 1 for this application.

$$
\therefore 2 5 0 \mathrm{kHz} = 8 \mathrm{MHz} / 3 2
$$

Step 3: The gate source should be set to “enable” always and therefore GATE1 is let open (pin 99 of CN1).

Step 4: Connect the counter output to an external device and write the control program. Refer to ‘DEMO1.C’ source code.

![The diagram depicts a clock selection logic feeding into a counter.\n\n**Blocks and Inputs:**\n*   **Input Terminals:**\n    *   Left group: `8MHz`, `COUT11`, and an unlabeled empty terminal.\n    *   Middle group: `ECK1`, `GND`, `CK1`, `COUT10`.\n*   **Switches (Multiplexers):** Three switch symbols (circles with arrows) are arranged in a hierarchical structure.\n    *   **First Switch:** Receives inputs from the left group (`8MHz`, `COUT11`).\n    *   **Second Switch:** Receives inputs from the middle group (`ECK1`, `GND`, `CK1`, `COUT10`).\n    *   **Third Switch:** Receives outputs from the first and second switches.\n*   **Counter Block:** A rectangle labeled `8254 Chip #1` and `Counter #1`.\n    *   Inputs: `C` (Clock), `G` (Gate/Control).\n    *   Output: `COUT1`.\n\n**Connections and Controls:**\n*   **Control Signal 1:** The text `set by function '_8554_SET_CK1'` points to the first switch.\n*   **Control Signal 2:** The text `set by function '8554_SET_cntCLK'` points to the third switch.\n*   **Signal Flow:** The outputs of the first and second switches feed into the third switch. The output of the third switch connects to the `C` input of the Counter.\n*   **Gate Input:** The `G` input of the Counter is connected to a line labeled `'H'` (which has an 'X' symbol on it).\n*   **Output:** The `COUT1` output leaves the block to the right.](.cpci-8554-r-manual-4-en/b56ce8c0fb9491427264ee499f7db6e33bbab9a998f2c2226a188cf848c6a76b.jpg)

Figure 20: Example of a frequency generator (1)

# 4.4.2 To generate a 1 pulse/1 hour signal

Step 1: Use a fixed clock source because the output is a fixed frequency.

Step 2: As the desired frequency is too slow, one counter will be unable to produce the desired frequency (1/3600sec=0.000278Hz. Therefore to reach this low frequency, cascade the independent counters 1, 2 and 3. Set the clock source of counter 1 to the internal 8MHz. Connect COUT1 to clock source of counter 2, and connect COUT2 to clock source of counter 3.

Step 3: Using the counter divider function, set counter 1 to 4000, counter 2 to 2000, and counter 3 to 3600.

$$
\therefore 8 \mathrm{MHz} / 4 0 0 0 / 2 0 0 0 / 3 6 0 0 = 1 / 3 6 0 0,
$$

Hence COUT3 will generate a pulse every hour.

Step 4: The gate sources to enable always, hence GATE1, GATE2, and GATE3 are open.

Step 5: Write and verify the control program. Refer to ‘DEMO2.C’ source code.

![This block diagram illustrates a cascading chain of three digital counters. Each section consists of input selection logic feeding into a counter block, which outputs a signal that feeds into the next section.\n\n**Top Section (Counter #1)**\n*   **Inputs:** On the far left, signals labeled `8MHz` and `COUT11` point toward a small circle. To their right, a vertical list of signals `ECK1`, `GND`, `CK1`, and `COUT10` each point toward small circles.\n*   **Control:** An arrow points to the switch mechanism labeled with the text:\n    `set by function`\n    `'_8554_SET_CK1'`\n*   **Block:** A rectangle is labeled at the top with `8254 Chip #1` and contains the text `Counter #1` in the center.\n*   **Connections:** The selected input from the switch and a signal labeled `'H'` enter the block.\n*   **Output:** An arrow labeled `COUT1` exits the right side.\n\n**Middle Section (Counter #2)**\n*   **Input:** The `COUT1` signal from the top section loops down to enter the input area.\n*   **Inputs:** A vertical list contains `ECK2`, `COUT1`, `CK1`, and `COUT10`.\n*   **Control:** An arrow points to the switch mechanism labeled: `set by function '8554_SET_cntCLK'`.\n*   **Block:** A rectangle is labeled at the top with `8254 Chip #1` and contains the text `Counter #2` in the center.\n*   **Connections:** The selected input from the switch and a signal labeled `'H'` enter the block.\n*   **Output:** An arrow labeled `COUT2` exits the right side.\n\n**Bottom Section (Counter #3)**\n*   **Input:** The `COUT2` signal from the middle section loops down to enter the input area.\n*   **Inputs:** A vertical list contains `ECK3`, `COUT2`, `CK1`, and `COUT10`.\n*   **Block:** A rectangle is labeled at the top with `8254 Chip #1` and contains the text `Counter #3` in the center.\n*   **Output:** An arrow labeled `COUT3` exits the right side.](.cpci-8554-r-manual-4-en/f52d77dbf2ee47e07ca432f8b6c5343db9ee288b8d014a24ac23b05367c52ccc.jpg)

Figure 21: Example of frequency generator (2)

# 4.5 Pulse Width Measurement

Step 1: Use a fixed clock source as base time interval (or base frequency).

Step 2: Assuming an internal 2MHz clock is used. The time base is:

$$
\Delta t = 1 / 2 \mathrm{M} = 5 \times 1 0 \mathrm{e} - 7 \sec
$$

The count range for measuring the pulse width is:

$$
\Delta t &lt;   \text { pulse   width } &lt;   \Delta t * 6 5 5 3 5 (= 3 2. 7 6 8 \mathrm{msec})
$$

If the specification of the pulse width to be measured is within the range, the 2MHz can be used. Otherwise change the base frequency of the counter, for example, you can set counter 2 to cascaded mode, and use counter 2 to measure the pulse width. The count range will increase but the resolution will decrease. Counter 1, 2, and 3 are used in this example.

Step 3: Connect GATE1 to the signal to be measured.

Step 4: Write and verify the control program. Refer to ‘DEMO3.C’ source code.

![The diagram illustrates a digital circuit configuration involving a debounce system, a connector, and a counter chip.\n\n**Labeled Blocks:**\n*   **debounce system**: A processing block on the left.\n*   **JP1**: A connector block adjacent to the debounce system.\n*   **8254 Chip #1**: A larger block on the right containing **Counter #1**.\n\n**Connections and Signals:**\n*   **Inputs to Debounce System**:\n    *   **ECLK1**: Enters the top of the 'debounce system'.\n    *   **DB_CLK**: Enters from the bottom, originating from a switch labeled **selectable by function '8554_SET_DBCLK'**. This switch selects between **2MHz** and **COUT11**.\n*   **Debounce System to JP1**: Lines connect the 'debounce system' to the **JP1** connector block.\n*   **JP1 Outputs**: Four signals exit **JP1** to small circular terminals:\n    *   **ECK1**\n    *   **GND**\n    *   **CK1**\n    *   **COUT10**\n*   **Counter Inputs**:\n    *   **c (Clock Input)**: Connected via a switch controlled by **set by function '8254_SET_cntCLK'**. This switch routes the **ECK1** signal from the JP1 output to the counter.\n    *   **g (Gate Input)**: Connected to the **Signal to be measured**.\n*   **Counter Output**:\n    *   **COUT1**: Exits the right side of the 8254 Chip.\n*   **Timing Diagram**:\n    *   Below the counter, a waveform shows a pulse labeled **Pulse Width**.\n    *   An annotation points to the waveform reading: **Polling D/I for c end of a pulse**.](.cpci-8554-r-manual-4-en/2141faf8e48c61530dd94ba0f7ad7c80c95c9232400b9c1b915fb73f63973ea7.jpg)

Figure 22: Example of pulse width measurement

# 4.6 Frequency Measurement

To measure a frequency around 1\~100 KHz the following steps can be followed.

Step 1: This application requires two counters. One counter is used to generate a pulse with a precise time interval. The pulse is then used to enable the second counter (Counting counter). In this example the gate control is from COUT3 and cascaded counters configuration is used. The pulse generator is set to counter 3 (clock from COUT2) and counter 1 is used to measure the frequency.
Step 2: The maximum value of the counting counter is 65535. To measure a 100 KHz signal, the time interval must be within 1/100 KHz x 65535 = 0.655 seconds. If the time interval is wider, then the measurement resolution is better, however, the counting value will overflow if the time interval is too large. This means the low pulse width for counter 3 output should be shorter than 0.655 sec.
Step 3: Connect the signal to be measured to ECLK1 and adjust JP1 to allow the debounce function.
Step 4: Connect GATE1 to /COUT3.
Step 5: The following block diagram illustrates the application. Write and verify the control program. The frequency of the signal is:
Frequency = Counting value of counter 1/precise time interval
Refer to ‘DEMO4.C’ source code.

![Here is an accurate description of the flowchart/block diagram, listing the labeled blocks and connections verbatim:\n\n**Top Section (Counter #2 Logic)**\n*   **Inputs:** `8MHz` and `COUT11` feed into a buffer (small circle).\n    *   **Label:** `set by function '_8554_SET_CK1'` points to this input stage.\n*   **Routing:** The output connects to a node labeled `CK1`, surrounded by labels `ECK2`, `COUT1`, and `COUT10`.\n*   **Switching:** This line feeds a switch controlled by an arrow labeled `set by function '_8554_SET_cntCLK'`.\n    *   Labels `'H'` and a cross `X` appear near the switch.\n*   **Inversion:** The output of the switch passes through a small circle (inverter).\n*   **Counter:** The signal enters the 'c' input of a block labeled `8254 Chip #1` containing `Counter #2`.\n*   **Output:** The block outputs `COUT2`, which leads to `Precis Time Interv`.\n\n**Bottom Section (Counter #1 & Debounce Logic)**\n*   **Measurement Input:** `ECLK1 ( frequency to be measured )` feeds into a block labeled `debounce system`.\n*   **Clock Selection:** A switch selects between `2MHz` and `COUT11`.\n    *   **Label:** `selectable by function '_8554_SET_DBCLK'` points to this switch.\n    *   The output of this selection is labeled `DB_CLK`, which feeds the `debounce system`.\n*   **Connector:** The `debounce system` connects to a connector labeled `JP1`.\n    *   `JP1` has a pin labeled `GND`.\n*   **Outputs:** The `debounce system` outputs signals labeled `ECK1`, `CK1`, and `COUT10`.\n*   **Switching:** `ECK1` feeds a switch controlled by an arrow labeled `set by function '_8554_SET_cntCLK'`.\n*   **Inversion:** The output of this switch passes through a small circle (inverter).\n*   **Counter:** The signal enters the 'c' input of a block labeled `8254 Chip #1` containing `Counter #1`.\n*   **Output:** The block outputs `COUT1`.\n\n**Gating Logic (Enable Counter #1)**\n*   **Feedback:** A dashed box encloses the gating logic.\n*   **Signal:** The output `COUT2` from the top counter is labeled `/COUT2`.\n*   **Buffer:** This `/COUT2` signal passes through a buffer (triangle).\n*   **Connection:** The buffer output connects to the 'G' input of `Counter #1`.\n    *   **Label:** `'H' enable counter #1` is below this logic.\n    *   **Label:** `connect by` is near the buffer output.](.cpci-8554-r-manual-4-en/d1fd8ab2f3007b08e96fde7d9eac47f8209ffba2025f86601671a7e4df3d8e86.jpg)

Figure 23: Example of frequency measurement (1)

# 4.7 Event Counter

This example counts how many external events in 1 second

Step 1: This application requires one counter to generate a time base of 1 second and the second counter to count the event. Cascaded counters 11and 12 are used as a watchdog timer. Counter 1 is used in this example to count the external events. The clock source of counter 1 is the event signal so the frequency is not fixed.

Step 2: Connect ECLK1 to the signal to be measured and adjust JP1 to enable the debounce function.

Step 4: The gate source of counter 1 is always enabled, so the external gate is open.

Step 5: Write the control program. Refer to‘DEMO5.C’ source code.

![The flowchart depicts a digital logic design involving clock generation, selection, and counting operations.\n\n**1. Clock Generation and Selection (Left Side)**\n*   **Debounce System:** The block labeled `debounce system` receives an input `ECLK1 ( Event Signal )`. It has a feedback loop input labeled `DB_CLK`.\n*   **DB_CLK Selection:** A switch labeled `selectable by function '_8554_SET_DBCLK'` selects between inputs `2MHz` and `COUT11`. The output of this switch is `DB_CLK`, which connects to the `debounce system`.\n*   **Connector JP1:** The `debounce system` connects to the top pin of connector `JP1`. `JP1` has three terminals:\n    *   Top pin: Connected to `debounce system`.\n    *   Middle pin: Connected to `GND`.\n    *   Bottom pin: Connected to a line labeled `ECK1`.\n\n**2. Counter Input Selection (Center/Top)**\n*   **Input Switch:** A switch selects one of four inputs: `ECK1` (from `JP1`), `GND` (from `JP1`), `CK1`, or `COUT10`.\n*   **Function Switch:** The output of the previous switch goes to a second switch labeled `selectable by function`.\n*   **Counter #1:** The output of this second switch connects to the `c` input of `Counter #1` (located in `8254 Chip #1`). The `G` input of `Counter #1` is connected to `'H'`. The output `o` of `Counter #1` is labeled `COUT1`.\n\n**3. Counter Chain (Bottom)**\n*   **Counter #11:** Located in `8254 Chip #4`. The `c` input receives `8MHz` and the `G` input receives `'H'`. The output `o` connects to the next counter.\n*   **Counter #12:** Located in `8254 Chip #4`. The `c` input is connected to the output of `Counter #11`. The `G` input is connected to `'H'`. The output `o` is labeled `COUT12`.](.cpci-8554-r-manual-4-en/58ab1bd602cf43d491346c0fa16bfce75bf21bad8f5096e0a71acb7807671ac6.jpg)

Figure 24: Example of event counter

# 4.8 Dual Interrupt System

The cPCI/PCI-8554/R provides a dual interrupt source (one internal plus one external), which can be very useful in some applications. For example, most applications require a watchdog timer to monitor the system periodically; hence, an IRQ channel is used. An emergency control may also be necessary; therefore the external IRQ channel will come in handy.

![Based on the provided block diagram, here is the accurate description of the labeled blocks and their connections:\n\n**Labeled Blocks:**\n*   **8254 Chip #4 (Counter #11)**: Located at the top left.\n*   **8254 Chip #4 (Counter #12)**: Located at the top center.\n*   **IRQ Flip-Flops** (Top Right): Located at the top right.\n*   **debounce system**: Located at the bottom left.\n*   **JP11**: A 3-pin header connector located next to the debounce system.\n*   **IRQ Flip-Flops** (Bottom Middle): Located at the bottom center.\n*   **PCI Controller**: Located at the bottom right.\n\n**Connections and Signals:**\n1.  **8254 Chip #4 (Counter #11)**:\n    *   Inputs: '8MHz' (connected to input **C**) and ''H'' (connected to input **G**).\n    *   Output: An arrow labeled **'0'** connects from Counter #11 to the **C** input of Counter #12.\n2.  **8254 Chip #4 (Counter #12)**:\n    *   Inputs: Receives the signal from Counter #11 at input **C**, and ''H'' is connected to input **G**.\n    *   Output: An arrow labeled **'COUT12'** connects to the input of the top **IRQ Flip-Flops**.\n3.  **IRQ Flip-Flops** (Top Right):\n    *   Inputs: Receives 'COUT12' and a dotted arrow labeled **'Clear by '8554_CLR_IRQ''**.\n    *   Output: A line labeled **'INT1'** connects from this block to the **PCI Controller**.\n4.  **debounce system** & **JP11**:\n    *   'DB_CLK' connects to the **debounce system**.\n    *   The **debounce system** connects to the bottom pin of **JP11**.\n    *   'E_INT' connects to the top pin of **JP11**.\n    *   An arrow labeled **'EXTINT'** exits the middle pin of **JP11** and connects to the bottom **IRQ Flip-Flops**.\n5.  **IRQ Flip-Flops** (Bottom Middle):\n    *   Inputs: Receives 'EXTINT' from JP11 and a dotted arrow labeled **'Clear by '8554_CLR_IRQ2''**.\n    *   Output: A line labeled **'INT2'** connects from this block to the **PCI Controller**.\n6.  **PCI Controller**:\n    *   Inputs: Receives **'INT1'** (from the top IRQ Flip-Flops) and **'INT2'** (from the bottom IRQ Flip-Flops).](.cpci-8554-r-manual-4-en/e653a5cf8a63da082781865377c1625cf9d248d05f74a1456078443047db82aa.jpg)

Figure 25: Example of dual interrupt system

# 5

# C/C++ Library

This chapter describes the software libraries for operating this card. Only the functions in the DOS library and Windows 95 DLL are described. Refer to the PCIS-DASK function reference manual, which is included in the ADLINK CD, for descriptions of Windows 98/NT/2000 DLL functions.

The function prototypes and useful constants are defined in the header files located in the LIB directory (DOS) and INCLUDE directory (Windows 95). For Windows 95 DLL, the developing environment can be Visual Basic 4.0 or above, Visual C/C++ 4.0 or above, Borland C++ 5.0 or above, Borland Delphi 2.x (32-bit) or above, or any Windows programming language that allows calls to a DLL.

# 5.1 Libraries Installation

Refer to the “Software Installation Guide” for information regarding software installation of libraries for DOS, Windows 95 DLL, or PCIS-DASK for Windows 98/NT/2000.

The device drivers and DLL functions for Windows 98/NT/2000 are included in the PCIS-DASK. Refer to the PCIS-DASK user’s guide and function reference, which is included in the ADLINK CD, for programming information.

# 5.2 Programming Guide

# 5.2.1 Naming Convention

The functions of the NuDAQ PCI or NuIPC CompactPCI card software drivers uses full-names to represent the functions' real meaning. The naming convention rules are:

# In DOS Environment:

$\mathtt { \_ { ( h a r d w a r e \_ m o d e l ) \_ ( a c t i o n \_ n a m e ) . e . g . \_ 8 5 5 4 \_ l n i t i a l ( \lambda ) . } }$

In order to recognize the difference between the DOS library and Windows 95 library, a capital "W" is placed at the start of each function name for Windows 95 DLL drivers. e.g. W\_8554\_Initial().

# 5.2.2 Data Types

We have defined some data types in the Pci\_8554.h (DOS) and Acl\_pci.h (Windows 95) header files. These data types are used by the NuDAQ Cards’ library. We recommend you use these data types in your application programs. The following table shows the data type names and their range.

&lt;table&gt;<tr><td>Type Name</td><td>Description</td><td>Range</td></tr><tr><td>U8</td><td>8-bit ASCII character</td><td>0 to 255</td></tr><tr><td>I16</td><td>16-bit signed integer</td><td>-32768 to 32767</td></tr><tr><td>U16</td><td>16-bit unsigned integer</td><td>0 to 65535</td></tr><tr><td>I32</td><td>32-bit signed integer</td><td>-2147483648 to 2147483647</td></tr><tr><td>U32</td><td>32-bit single-precision floating-point</td><td>0 to 4294967295</td></tr><tr><td>F32</td><td>32-bit single-precision floating-point</td><td>-3.402823E38 to 3.402823E38</td></tr><tr><td>F64</td><td>64-bit double-precision floating-point</td><td>-1.797683134862315E308 to 1.797683134862315E309</td></tr><tr><td>Boolean</td><td>Boolean logic value</td><td>TRUE, FALSE</td></tr></table>

Table 9. Data types and their ranges

# 5.3 \_8554\_Initial

# @ Description

The cPCI/PCI-8554/R cards are initialized by this function. The software library could be used to control multiple cPCI/PCI-8554/R cards. Because the cPCI/PCI-8554/R is designed with the PCI bus architecture and meets the plug and play specifications, the IRQ and I/O address are assigned by system BIOS directly.

# @ Syntax

C/C++ (DOS)

U16 \_8554\_Initial (U16 \*existCards, PCI\_INFO \*pciinfo)

C/C++ (Windows 95)

U16 W\_8554\_Initial (U16 \*existCards, PCI\_INFO \*pciinfo)

# Visual Basic (Windows 95)

W\_8554\_Initial (existCards As Integer, pciInfo As PCI\_INFO) As Integer

# @ Arguments

existCards:

The numbers of installed cPCI/PCI-8554/R cards. The returned value shows how many cPCI/PCI-8554/R cards are installed in the system.

pciinfo:

This structure stores the PCI bus plug and play initialization information, which is determined by PnP BIOS. The PCI\_INFO structure is defined in the PCI\_8554.H header file. The base I/O address and the interrupt channel number is stored in pciinfo for reference.

# @ Return Value

ERR\_NoError, ERR\_PCIBiosNotExist

# 5.4 \_8554\_Write\_Counter

# @ Description

User can directly write commands to counters 1\~12 using this function. Using this function, user can also re-assign the counter numbers 1\~12 in any order

# @ Syntax

C/C++ (DOS)

U16 \_8554\_Write\_Counter (U16 cardNo, U16 cntNo, U16 mode, U16 cntrVal)

C/C++ (Windows 95)

U16 W\_8554\_Write\_Counter (U16 cardNo, U16 cntNo, U16 mode, U16 cntrVal)

# Visual Basic (Windows 95)

W\_8554\_Write\_Counter (ByVal cardNo As Integer, ByVal cntNo As Integer, ByVal mode As Integer, ByVal cntrVal As Integer) As Integer

# @ Arguments

cardNo: card number to be selected

cntNo: Counter/Timer number. This value must be between 1 and 12.

mode: Counter operation mode. This value must be between 0 and 5.

cntrVal: The counter value to be written to the counter.

# @ Return Value

ERR\_NoError

ERR\_BoardNoInit

ERR\_InvalidCounterNo: cntNo is out of range.

ERR\_TimerMode: mode is out of range

# 5.5 \_8554\_Read\_Counter

@ Description

User can directly read counter information with this function.

@ Syntax

```txt
C/C++ (DOS)
```

```csv
U16 _8554_Read_Counter (U16 cardNo, U16 cntNo, U16 *mode, U16 *cntrVal)
```

```txt
C/C++ (Windows 95)
```

```txt
U16 W_8554_Read_Counter (U16 cardNo, U16 cntNo, U16 *mode, U16 *cntrVal)
```

# Visual Basic (Windows 95)

W\_8554\_Read\_Counter (ByVal cardNo As Integer, ByVal cntNo As Integer, mode As Integer, cntrVal As Integer) As Integer

@ Arguments

cardNo: card number to be selected

cntNo: Counter/Timer number. This value must be between 1 and 12.

mode: Counter operation mode.

cntrVal: Counter value read back from counter

@ Return Value

ERR\_NoError, ERR\_BoardNoInit

ERR\_InvalidCounterNo: cntNo is out of range.

# 5.6 \_8554\_Stop\_Counter

# @ Description

User can directly stop the counter with this function. This function will stop the counter by setting the counter to mode 5.

# @ Syntax

```txt
C/C++ (DOS)
```

U16 \_8554\_Stop\_Counter (U16 cardNo,U16 cntNo,U16 \*cntrVal)

```txt
C/C++ (Windows 95)
```

U16 W\_8554\_Stop\_Counter (U16 cardNo,U16 cntNo,U16 \*cntrVal)

# Visual Basic (Windows 95)

W\_8554\_Stop\_Counter (ByVal cardNo As Integer, ByVal cntNo As Integer, cntrVal As Integer) As Integer

# @ Arguments

cardNo: card number to be selected

cntNo: Counter/Timer number. This value must be between 1 and 12.

cntrVal: Counter value read back from counter

# @ Return Value

ERR\_NoError , ERR\_BoardNoInit

ERR\_InvalidCounterNo: if cntNo is not in the range of 1 \~ 12

# 5.7 \_8554\_Read\_Status

@ Description

User can directly read current counter status with this function.

@ Syntax

C/C++ (DOS)

U16 \_8554\_Read\_Status (U16 cardNo, U16 cntNo, U16 \* cntrVal, U16 \*status)

C/C++ (Windows 95)

U16 W\_8554\_ Read\_Status (U16 cardNo, U16 cntNo, U16 \* cntrVal, U16 \*status)

Visual Basic (Windows 95)

W\_8554\_Read\_Status (ByVal cardNo As Integer, ByVal cntNo As Integer, cntrVal As Integer, status As Integer) As Integer

@ Arguments

cardNo: card number to be selected

cntNo: Counter/Timer number. This value must be between 1 and 12.

cntrVal: Counter value read back from counter

status: current status read back from counter, refer to 8254’s datasheet for more information

@ Return Value

ERR\_NoError, ERR\_BoardNoInit

ERR\_InvalidCounterNo: if cntNo is not in the range of 1 \~ 12

# 5.8 \_8554\_DO

@ Description

Write an 8-bit data to the digital output port.

@ Syntax

C/C++ (DOS)

U16 \_8554\_DO (U16 cardNo, U16 doData)

C/C++ (Windows 95)

U16 W\_8554\_DO (U16 cardNo, U16 doData)

Visual Basic (Windows 95)

W\_8554\_DO (ByVal cardNo As Integer, ByVal doData As Integer) As Integer

@ Arguments

cardNo: card number to be selected

doData: the value to be written to digital output port

@ Return Value

ERR\_NoError

ERR\_PCIBiosNotExist

# 5.9 \_8554\_DI

@ Description

Read an 8-bit data from the digital input port.

@ Syntax

C/C++ (DOS)

U16 \_8554\_DI (U16 cardNo, U16 \*diData)

C/C++ (Windows 95)

U16 W\_8554\_DI (U16 cardNo, U16 \*diData)

Visual Basic (Windows 95)

W\_8554\_DI (ByVal cardNo As Integer, diData As Integer) As Integer

@ Arguments

cardNo: card number to be selected

doData: the value read from the digital input port

@ Return Value

ERR\_NoError, ERR\_BoardNoInit

# 5.10 \_8554\_SET\_cntCLK

# @ Description

This function is used to select the clock source for counters 1\~10 (Clock source for counter 11 is 8MHz and clock source of counter 12 is from COUT11, both clock sources are fixed).

# @ Syntax

C/C++ (DOS)

U16 \_8554\_DI (U16 cardNo, U16 cntNo, U16 clkMODE)

C/C++ (Windows 95)

U16 W\_8554\_DI (U16 cardNo, U16 cntNo, U16 clkMODE)

# Visual Basic (Windows 95)

W\_8554\_SET\_cntCLK (ByVal cardNo As Integer, ByVal cntNo As Integer, ByVal clkMODE As Integer) As Integer

# @ Arguments

cardNo: card number to be selected

cntNo: Counter/Timer number. This value must be between 1 and 10.

clkMODE: Select clock sources:

$$
" 0" = \text { ECLKn }.
$$

$$
" 1" = \text { COUTn - 1 }.
$$

$$
" 2" = \mathrm{CK1}.
$$

$$
" 3" = \text { COUT10 }.
$$

# @ Return Value

ERR\_NoError

ERR\_BoardNoInit

ERR\_InvalidCounterNo: cntNo is not in the range of 1 \~ 12

ERR\_InvalidMode: clkMODE is not in the range of 0 \~ 3

# 5.11 \_8554\_SET\_CK1

@ Description

Select source for CK1.

@ Syntax

C/C++ (DOS)

U16 \_8554\_SET\_CK1 (U16 cardNo, U16 selCK1)

C/C++ (Windows 95)

U16 W\_8554\_SET\_CK1 (U16 cardNo, U16 selCK1)

Visual Basic (Windows 95)

W\_8554\_SET\_CK1 (ByVal cardNo As Integer, ByVal selCK1 As Integer) As Integer

@ Arguments

cardNo: card number to be selected

selCK1: if selCK1 is set to “0” then CK1 = C8M, and if set to “1” then CK1 = COUT11

@ Return Value

ERR\_NoError

ERR\_BoardNoInit

ERR\_InvalidMode: selCK1 is out of range

# 5.12 \_8554\_SET\_DBCLK

@ Description

Select debounce clock.

@ Syntax

C/C++ (DOS)

U16 \_8554\_SET\_DBCLK (U16 cardNo, U16 DBCLK)

C/C++ (Windows 95)

U16 W\_8554\_SET\_DBCLK (U16 cardNo, U16 DBCLK)

Visual Basic (Windows 95)

W\_8554\_SET\_DBCLK (ByVal cardNo As Integer, ByVal DBCLK As Integer) As Integer

@ Arguments

cardNo: card number to be selected

DBCLK: if dbclk is set to “0” then DB\_CLK = COUT11, and if set to “1” then DB\_CLK = 2MHz

@ Return Value

ERR\_NoErro, ERR\_BoardNoInit

ERR\_InvalidMode: DBCLK is out of range

# 5.13 \_8554\_Set\_INT\_Control

# @ Description

The cPCI/PCI-8554/R has a dual interrupts system. Two interrupt sources can be generated and be checked by the software. This function is used to select and control the cPCI/PCI-8554/R interrupt sources. The interrupt source can either come from counter 12’s output, COUT12 (INT1) or from an external interrupt signal EXTINT (INT2).

# @ Syntax

C/C++ (DOS)

U16 \_8554\_Set\_INT\_Control (U16 cardNo, U16 int1Flag, U16 int2Flag)

C/C++ (Windows 95)

U16 W\_8554\_Set\_INT\_Control (U16 cardNo, U16 int1Flag, U16 int2Flag)

# Visual Basic (Windows 95)

W\_8554\_Set\_INT\_Control (ByVal cardNo As Integer, ByVal int1Falg As Integer, ByVal int2Falg As Integer)

# @ Arguments

cardNo: card number to be selected

int1Flag: INT1 setting; 0: disable, 1: enable

int2Flag: INT2 setting; 0: disable, 1: enable

# 5.14 \_8554\_Get\_IRQ\_Status

# @ Description

The cPCI/PCI-8554/R has dual interrupts system. Two interrupt sources can be generated and be checked by the software. This function is used to distinguish which interrupt has been inserted if both INT1 and INT2 interrupts are used.

# @ Syntax

```txt
C/C++ (DOS)
```

U16 \_8554\_Get\_IRQ\_Status (U16 cardNo, U16 \*ch1, U16 \*ch2)

```txt
C/C++ (Windows 95)
```

U16 W\_8554\_Get\_IRQ\_Status (U16 cardNo, U16 \*ch1, U16 \*ch2)

# Visual Basic (Windows 95)

W\_8554\_Get\_IRQ\_Status (ByVal cardNo As Integer, ch1 As Integer, ch2 As Integer)

# @ Arguments

cardNo: card number to be selected

ch1: INT1 status; 0: interrupt is not from INT1, 1: interrupt is from INT1

ch2: INT2 status; 0: interrupt is not from INT2, 1: interrupt is from INT2

# 5.15 \_8554\_INT\_Enable

# @ Description

This function is only available to the Windows 95 driver. It is used to activate the interrupt controller. After calling this function, every time an interrupt request signal is generated, a software event is signaled.

# @ Syntax

C/C++ (Windows 95)

U16 W\_8554\_INT\_Enable (U16 cardNo, HANDLE \*hEvent)

# Visual Basic (Windows 95)

W\_8554\_INT\_Enable (ByVal cardNo As Integer, hEvent As Long) As Integer

# @ Arguments

cardNo: card number to be selected

hEvent: the address of an array for two handles. HEvent[0] and hEvent[1] are the events for interrupt signals INT1 and INT2 respectively.

# @ Return Value

ERR\_NoError

ERR\_BoardNoInit

# 5.16 \_8554\_INT\_Disable

@ Description

This function is only available to the Windows 95 driver. It is used to disable the generation of an interrupt signal.

@ Syntax

C/C++ (Windows 95)

U16 W\_8554\_INT\_Disable (U16 cardNo)

Visual Basic (Windows 95)

W\_8554\_INT\_Disable (ByVal cardNo As Integer) As Integer

@ Arguments

cardNo: card number to be selected

@ Return Value

ERR\_NoError, ERR\_BoardNoInit

# 5.17 \_8554\_CLR\_IRQ1

@ Description

This function is only available to the DOS driver. It is used to clear the interrupt request, which is generated by INT1. You should use this function to clear the interrupt request status; otherwise the new incoming interrupt will not be generated.

@ Syntax

C/C++ (Windows 95)

U16 \_8554\_CLR\_IRQ1 (U16 cardNo)

@ Arguments

cardNo: card number to be selected

# 5.18 \_8554\_CLR\_IRQ2

# @ Description

This function is only available to the DOS driver. It is used to clear the interrupt request, which is generated by INT2. You should use this function to clear the interrupt request status; otherwise the new incoming interrupt will not be generated.

# @ Syntax

C/C++ (Windows 95)

U16 \_8554\_CLR\_IRQ2 (U16 cardNo)

# @ Arguments

cardNo: card number to be selected

# Warranty Policy

Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the following carefully.

1. Before using ADLINK’s products please read the user manual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA application form which can be downloaded from: http://rma.adlinktech.com/policy/.
2. All ADLINK products come with a limited two-year warranty, one year for products bought in China.

The warranty period starts on the day the product is shipped from ADLINK’s factory.
Peripherals and third-party products not manufactured by ADLINK will be covered by the original manufacturers' warranty.
For products containing storage devices (hard drives, flash cards, etc.), please back up your data before sending them for repair. ADLINK is not responsible for any loss of data.
Please ensure the use of properly licensed software with our systems. ADLINK does not condone the use of pirated software and will not service systems using such software. ADLINK will not be held legally responsible for products shipped with unlicensed software installed by the user.
For general repairs, please do not include peripheral accessories. If peripherals need to be included, be certain to specify which items you sent on the RMA Request & Confirmation Form. ADLINK is not responsible for items not listed on the RMA Request & Confirmation Form.

3. Our repair service is not covered by ADLINK's guarantee in the following situations:

Damage caused by not following instructions in the User's Manual.
Damage caused by carelessness on the user's part during product transportation.
Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers.

Damage caused by inappropriate storage environments such as with high temperatures, high humidity, or volatile chemicals.
Damage caused by leakage of battery fluid during or after change of batteries by customer/user.
Damage from improper repair by unauthorized ADLINK technicians.
Products with altered and/or damaged serial numbers are not entitled to our service.
This warranty is not transferable or extendible.
Other categories not protected under our warranty.

4. Customers are responsible for all fees necessary to transport damaged products to ADLINK.

For further questions, please e-mail our FAE staff: service@adlinktech.com
[🔗 Link to the original document](.cpci-8554-r-manual-4-en/cpci-8554-r-manual-4-en.pdf)
