ADLINK Technology NuDAQ ACL-8454 User Manual

ADLINK Technology NuDAQ ACL-8454 User Manual

Multifunctions counter / timer card

Advertisement

Quick Links

®
N u D A Q
ACL-8454
MultiFunctions
Counter / Timer Card
User's Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ADLINK Technology NuDAQ ACL-8454

  • Page 1 ® N u D A Q ACL-8454 MultiFunctions Counter / Timer Card User’s Guide...
  • Page 3 @Copyright 1997~2000 ADLINK Technology Inc. All Rights Reserved. Manual Rev. 1.22: April 15, 2000 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 manu- facturer.
  • Page 4 Getting service from ADLINK ♦ Customer Satisfaction is always the most important thing for ADLINK Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. Web Site http://www.adlink.com.tw Sales & Service service@adlink.com.tw...
  • Page 7: Table Of Contents

    Contents Contents..............i How to Use This Guide ..........iii Chapter 1 Introduction ..........1 Features................3 Applications................ 3 Specifications..............4 Chapter 2 Installation ..........5 What You Have ..............5 Unpacking................5 PCB Layout of ACL-8454 ............. 6 Default Configurations............7 Base Address Setting............8 Pin Assignment of Connector..........
  • Page 8 Digital Input Registers............28 Digital Output Register............28 Low-level Programming ........... 30 Chapter 4 Applications ...........32 Timer / Counter Connection..........32 Frequency Generator............33 Pulse Width Measurement..........35 Frequency Measurement ..........36 Event Counter..............38 Chapter 5 C/C++ Library..........39 Installation................ 40 W_8454_Initial..............
  • Page 9: How To Use This Guide

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

    Introduction The ACL-8454 is a general purpose counter/timer and digital I/O card.It is a compact-size add-on card for IBM AT compatible PC in control, monitoring and sensing applications. There are two version of ACL-8454: ACL-8454/6 and ACL-8454/12. ACL-8454/6 has two 8254 chips (6 counters) on board.
  • Page 12 and the external gate signals. Whenever the external clock or gate signals are not used, they can be dedicatedly used as D/I. There are at least 8 D/I bits under default setting of the ACL-8454 because only two 8254 chips are used. ACL-8454 provides one interrupt signal which comes from one of four internal or external interrupt sources.
  • Page 13: Features

    Features The ACL-8454 Counter / T imer and Digital I/O Card provides the following advanced features: • Default 6 counters/timers are installed and it is expandable to 12 counters/timers at most • Multi-configurations of counters / timers: • Flexible setting for each independent counter, the clock source could be external, internal or cascaded.
  • Page 14: Specifications

    Specifications ♦ Programmable Counter/Timer • Device : 8254 x 2 (default), or 8254 x 4 (at most) • Counters : 16-bit down counter • Clock source : internal clock, external source or cascaded • Gate control : default enable or external control ♦...
  • Page 15: Chapter 2 Installation

    Installation This chapter describes the configuration and function of the ACL- 8454 and the steps to install the ACL-8454. At first, the contents in the package and unpacking information that you should care about are described. The versatile configurations of ACL-8454 are introduced so that you can configure it according to your applications.
  • Page 16: Pcb Layout Of Acl-8454

    Inspect the card module carton for obvious damage. Shipping and handling may cause damage to your module. Be sure there are no shipping and handing damages on the module before processing. After opening the card module carton, extract the system module and place it only on a grounded anti-static surface component side up.
  • Page 17: Default Configurations

    Default Configurations To operate the ACL-8454 correctly, users should understand the structure of ACL-8454 and details of the possible configurations. The block d iagram of the ACL-8454 is shown in chapter 1. contains the clock system, counter system, interrupt system and address decoder etc.
  • Page 18: Base Address Setting

    Base Address Setting The ACL-8454 requires 8 consecutive address locations in the I/O address space. The base address of the ACL-8454 is res tricted by the following conditions. 1. The base address must be within the range Hex 200 to Hex 3FF. 2.
  • Page 19 I/O port Address(Hex) 200-207 208-20F 210-217 218-21F 237-23F 240-247 (default) 248-24F 3F0-3F7 3F8-3FF * A3, ..., A8 is corresponding to PC Bus address lines Table 2.2. Possible Base Address Combinations Installation • 9...
  • Page 20: Pin Assignment Of Connector

    Pin Assignment of Connector (20) ECLK1(DI0) (21) ExtG1(DI4) COUT1 (22) ExtG2(DI5) ECLK2(DI1) (23) COUT2 ECLK3(DI2) (24) ExtG3(DI6) COUT3 (25) ExtG4(DI7) ECLK4(DI3) (26) COUT4 ECLK7(DI8) (27) ExtG7(DI12) COUT7 (28) ExtG8(DI13) ECLK8(DI9) (10) (29) COUT8 ECLK9(DI10) (11) (30) ExtG9(DI14) COUT9 (12) (31) ExtG10(DI15) ECLK10(DI11/EInt) (13)
  • Page 21: Clock System

    Clock System The clock system of ACL-8454 provides the internal clock source for the 8254 chips. The block diagram of the clock system is shown in the Figure 2.4. Two clock sources, which named as CLOCK1 and CLOCK2, are divided from the internal 10Mhz signal. The clock of every counter/timer can be one of the 4 sources: CLOCK1, CLOCK2, external clock source or cascaded source from the ‘last’...
  • Page 22: Counters Architecture

    (Default) Figure 2.5 Jumper setting of CLOCK1 CLOCK2 (Low Frequency) The clock source of CLOCK2 can be set by jumper ‘CLOCK2’. The frequency could be 1 MHz or 100 KHz which are divided from CLOCK1. The CLOCK2 is provided for low frequency applications. Figure 2.6 shows the jumper setting and the corresponding frequency.
  • Page 23 reference number of chips and the counters number. Installation • 13...
  • Page 24 8254 Chip Reference Counter Type of Installed Number Number Number Counter ACL-8454/6 Counter #1 Independent Chip #1 Counter #2 Independent ACL-8454/12 Counter #3 Independent ACL-8454/6 Counter #4 Independent Chip #2 Counter #5 ACL-8454/12 Counter #6 Cascaded Counter #7 Independent ACL-8454/12 Chip #3 Counter #8 Independent...
  • Page 25 8254 Chip #2 8254 Chip #1 CLK4 CLK1 COUT4 COUT1 Counter #4 Counter #1 GATE4 GATE1 CLK2 1 MHz COUT5 COUT2 Counter #5 Counter #2 GATE2 CLK3 COUT5 COUT6 COUT3 Counter #6 Counter #3 GATE3 8254 Chip #4 8254 Chip #3 CLK10 CLK7 COUT10...
  • Page 26 be used as interrupt source. See ‘Interrupt Sources’ section for details. The following figure demonstrates a set of cascaded counter - counter #5 and #6. 8254 Chip #2 1 MHz COUT5 Counter #5 COUT5 COUT6 Counter #6 Figure 2.10 Example of ‘cascaded counter’ User Configurable Cascaded Counters Although there are two cascaded counter on board, users may need more cascaded counters.
  • Page 27: Clock Source Configurations

    Clock Source Configurations For every independent counter, four signals can be chosen as clock source by jumper setting. The clock source of counter #n comes from either CLOCK1, CLOCK2, the external clock source (ECLK n), or the cascaded counter output. Note that the clock source of the cascaded counters (counter #5, #6, #11 and #12) are fixed.
  • Page 28 (1) Use internal clock source CLOCK1. CLOCK1 CLOCK2 CK n III: LAST CHANNEL CLK n EXTERNAL (2) Use internal clock source CLOCK2. CLOCK1 CLOCK2 CK n III: LAST CHANNEL CLK n EXTERNAL (3) Use cascaded clock source from the last channel. CLOCK1 CLOCK2 CK n...
  • Page 29: Gate Control Configurations

    The Table 2.4 shows the reference number of the clock source jumpers and its corresponding counter/timer channels number. The default setting of every jumper is also shown. The clock sources of CLK1~4 come from internal source ‘ CLOCK1’ and the clock sources of CLK7~10 come from external sources.
  • Page 30: Counter Outputs

    Figure 2.14 Gate source of counter #1 ~#4 The jumper setting is flexible for users‘ applicati ons. There are two configurations: jumper installed or NOT installed. The default state of jumper is not installed and the counter can be controlled externally or just pull-high enable.
  • Page 31: Duai Interrupt System

    2.12 DuaI Interrupt System One Internal plus one external interrput sources The ACL-8454 has two interrupt sources on board. That means the two interrupt levels or two IRQ lines can be used by this board. The block diagram of the interrupt system is shown in Figure 2.15. The two IRQ channels can be set by jumper JP1 and JP2 respectively.
  • Page 32 /COUT6 High IRQ Level Ext.Int. COUT12 IRQ 3 (ECLK10) Low IRQ Level Figure 2.15. Block diagram of interrupt system Dual interrput example The dual interrupt system is very useful in some application. For example, most of the application needs a watchdog timer to monitor the system pereodicly, hence, one IRQ channel is used.
  • Page 33: Digital Input And Output

    ‘DI’ means the signal can be used as digital input pin dedicatedly. Chip Chip Chip Chip /COUT6 COUT12 ECLK10 Remarks √ √ × × ACL-8454 / 6 √ √ √ √ ACL-8454 / 12 √ √ √ × user installed √...
  • Page 34: Summary Of Default Setting

    Digital Input(DI) From TTL Devices Digital Output (DO) To TTL Devices Outside Device ACL-8454 Figure 2.13 Digital I/O Connection 2.14 Summary of Default Setting Chip #1 and chip #2 are installed. Counter #1 ~ counter #6 are available. Chip #3 and chip #4 are not installed. Counter #1~ #4 and counter #7~#10 CLK n = CLOCK1 n GATE n = ExtG n...
  • Page 35: Daughter Board Connection

    signal may control the gate source of the counters can cause your application fail. The low IRQ source should also be checked because the counter #12 is installed and COUT12 can only be used as internal interrupt source if 8254 chip #4 is installed. Please takes care the issues mentioned above 2.16 Daughter Board Connection The ACL-8454 can be connected with daughter boards ACLD-9137,...
  • Page 36: Chapter 3 Registers Format

    Registers Format This chapter describes details of the register format of the ACL- 8454. This information is quite useful for the programmer who wish to handle the card by low-level program. In addition, the low level programming is introduced. This information can help the beginners to manipulate the ACL-8454 in the shortest learning time.
  • Page 37: Timer/Counter Registers

    Timer/Counter Registers The 8254 occupies 4 I/O address locations in the ACL-8454 as shown blow. Users can refer to NEC's or Intel's data sheet for a full description of the 8254 features, condensed information is specified in Appendix C. Note that only one of the four 8454 chips can be enable in the same time.
  • Page 38: Digital Input Registers

    Chip #4 Digital Input Registers There are 16 digital input channels on the ACL-8454. The digital input channels are common with the external gate signals (ExtG 1~3 & ExtG 7~10) and the external clock signals (ECLK 1~3 & ECLK 7~10). The external clock source ECLK n and external gate control ExtG n can be read back from the DI ports.
  • Page 39 Base + 5 Registers Format • 29...
  • Page 40: Low-Level Programming

    Low-level Programming To manipulate the ACL-8454, users may understand how to write a hardware dependant low-level program. The low-level programming can be carried out by using either assembly or high-level language such as BASIC or C language. The following gives examples to show how to use programming language to access an add-on I/O card.
  • Page 41 BASIC language To write an output port: BASE=&H240 VALUE% = &H2F OUT( BASE+2), VALUE % OUT( &H242 ), &H20 To read an input port BASE=&H240 VALUE=INP( BASE+2) VALUE=INP( &H242 ) C language (Borland C++) To write an output port: #define BASE 0x240 unsigned int...
  • Page 42: Chapter 4 Applications

    Applications Timer / Counter Connection The ACL-8454 has four 8254 chips on board. It offers 8 independent 16-bit programmable down counters and two pairs of cascaded counters. To implement your application, you can following the procedure to design your application and connect the signals. Check if use a clock source with fixed frequency, if answer is ‘No’...
  • Page 43: Frequency Generator

    Frequency Generator Example 1 : To generate a 250 K Hz Square Wave. step 1: To use fixed clock source because the output is a fixed frequency. step 2: Internal 2M Hz is suitable to generate 250K Hz frequency. Use Counter #4 for this application. ∵...
  • Page 44 It is really a large number. Share the divider value to the two counters, for example, the divider of the first stage can be 60000 and the divider of the second stage is 6000. ∵ 360,000,000 = 60000 x 6000 Therefore, ‘user configurable cascaded counters’...
  • Page 45: Pulse Width Measurement

    Pulse Width Measurement Example : To measure pulse width (with ∆ T < 32ms) step 1: To use fixed clock source as base time interval (or base frequency). step 2: Assume Internal 2M Hz clock is used. The time base is ∆...
  • Page 46: Frequency Measurement

    Frequency Measurement Example : To measure frequency around 1~100 K Hz step 1: This application need two counters. One counter is used to generate a pulse whose time interval is very precise. The pulse is used to enable the other counter (counting counter) by gate control.
  • Page 47 Figure 4.4 Example of frequency measurement (1) The ACL-8454 can synchronously measure frequency from four channels because the internal gate control is connected to 4 counters (#1~4) in the same time. Furthermore, as the gate signal goes low, an interrupt is generated. The user can write an ISR to sample and calculate the frequency of all the 4 channels.
  • Page 48: Event Counter

    Event Counter Example : To count external event in 1 sec step 1: This application needs one counter to generate a time base of 1 sec and the second counter to count the event. The cascaded counter #5, #6 can perform the watchdog timer. The another counter #1 is used as an example to count external event.
  • Page 49: Chapter 5 C/C++ Library

    C/C++ Library There are more than 10 functions provided by the C language library. By using the C language library, it saves a lot of programming time. If you need to perform some special functions which are not provided in the library, you can modify the library according to your requirement. The fully commented C source of the library is also included in your software library diskette.
  • Page 50: Installation

    Installation u MS-DOS/Windows 3.1 Software Installation With CD-ROM: 1. Turn your PC's power switch on 2. Put the CD-ROM into your CD-ROM drive 3. Type the commands: Dos: X:\> CD\NuDAQISA\8454\DOS X:\NuDAQISA\8454\DOS> SETUP (x identifies the drive that contains the CD-ROM) After installation, all the files of ACL-8454 Library &...
  • Page 51 The Driver Registry Utility first shows the follwing window. If 8454 driver has been registered, it will be shown on the Registered Driver list. If the ACL-8454 device DOES NOT want to perform interrupt operation’, please click “Done” or “Exit!” to exit this utility. Click “New…”...
  • Page 52: W_8454_Initial

    If you don’t need to use both of these two IRQ lines, set the unused IRQ level as “0”. Then you can save one IRQ level for your system. After the setting for IRQs level and base address, click “OK” to register the driver.
  • Page 53: Set_Chip

    W_8454_Initial (ByVal base_address As Long) As Long C/C++ (DOS) int _8454_Initial( int base_address ) @ Arguments int base_address : base address of the card @ Return Value No_Error : No error Base_Address_Error : When the base address is illegal Set_Chip @ Description This is a macro which is used to select or active one of the four 8254 chips, Refer the 8454.H for the definition of the Set_Chip macro.
  • Page 54: W_8454_Write_Counter

    W_8454_Write_Counter @ Description To write a command to a counter. The user can directly assign the counter number 1~12, therefore it is not necessary to care about the chips number and other details. The output and response of the counter is dependent on the ‘Mode’ argument and the configuration on hardware.
  • Page 55: W_8454_Read_Counter

    W_8454_Read_Counter @ Description To read the counter value from a counter. The user can directly assign the counter number 1~12, therefore it is not necessary to care about the chips number and other details. @ Syntax Microsoft C/C++ (Windows, Win95 & Win-NT) int W_8454_Read_Counter (int CntrNo, int *Mode, unsigned int *CntrVal) Visual Basic...
  • Page 56: W_8454_Do

    int W_8454_Stop_Counter (int CntrNo, unsigned int *CntrVal) Visual Basic Windows 3.11 Version: W_8454_Stop_Counter (ByVal CntrNo As Integer, CntrVal As Integer) As Long Win-95 or Win-NT Version: W_8454_Stop_Counter (ByVal CntrNo As Long, CntrVal As Long) As Long C/C++ (DOS) int _8454_Stop_Counter(int CntrNo, unsigned int *CntrVal) @ Arguments int CntrNo...
  • Page 57: W_8454_Di

    Always no error W_8454_DI @ Description To read the data of the digital input port. It is possible to read the 8 LSBs, 8 MSBs, or read only one bit channel by the DI relative functions. @ Syntax Microsoft C/C++ (Windows, Win95 & Win-NT) int W_8454_DI( UINT *DI_Value ) int W_8454_DI_L( UINT *DI_LValue ) int W_8454_DI_H( UINT *DI_HValue )
  • Page 58 UINT *DI_Hvalue : the digital input value of port BASE+5, note that only the low 8 bits is effective. int Bit_No : the bit channel number to be read back, the value should be in the range of 0 ~ 15 @ Return Value Always no error for _8454_DI(), _8454_DI_L(), _8454_DI_H() For _8454_DI_bit():...
  • Page 59: 8454 Mode Functions

    8454 Mode Functions @ Description This is a macro, instead of using function, which is used to program the mode of the counters. Refer the 8454.H for the definition of these macros The macro name are designed for easy to memorize or to be referenced. User can use these macros instead of using the ‘_8454_Write_Counter()’...
  • Page 60: W_8454_Int_Enable

    5.10 W_8454_INT_Enable @ Description This function is only available in Window 95 driver and Windows NT driver. The function is used to initialize and start up the interrupt control. After calling this function, every time an interrupt request signal generated, a software event is signaled. So that in your program, your can use wait operation to wait for the event.
  • Page 61: W_8454_Int_Disable

    5.11 W_8454_INT_Disable @ Description This function is only available in Window 95 driver and Windows NT driver. This function is used to stop interrupt signal generation. Note : This function has to be called after the W_8454_INT_Enable is called. @ Syntax Microsoft C/C++ (Win-95 &...
  • Page 62: Appendix 8254 Timer Chip Operation

    Appendix 8254 Timer Chip Operation The ACL-8454 has at most four interval 8254 chips on board. Refer to section 3.5 for the signal connection and the configuration of the counters. The following sections describe the details of the 8254 chip. The 8254 Timer / Counter Chip The Intel (NEC) 8254 contains three independent, programmable, multi-mode 16 bit counter/timers.
  • Page 63 Control Byte Before loading or reading any of these individual counters, the control byte (BASE+3) must be loaded first. The format of the control byte is : • SC1 & SC0 - Select Counter ( Bit 7 & Bit 6) COUNTER Select Counter 0 Select Counter 1...
  • Page 64 Mode Definitions In 8254, six operating modes can be selected. they are : • Mode 0 : Interrupt on Terminal Count • Mode 1 : Programmable One-Shot. • Mode 2 : Rate Generator. • Mode 3 : Square Wave Rate Generator. •...
  • Page 65: Product Warranty / Service

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

This manual is also suitable for:

Nudaq acl-8454/6Nudaq acl-8454/12

Table of Contents