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...
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..............
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.
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.
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.
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.
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.
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.
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...
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’...
(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 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.
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...
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.
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.
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.
‘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 √...
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...
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,...
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.
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.
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.
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...
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’...
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’...
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 ∆...
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.
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.
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.
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…”...
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.
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.
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.
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...
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...
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():...
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()’...
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.
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 &...
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. •...
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.
Need help?
Do you have a question about the NuDAQ ACL-8454 and is the answer not in the manual?
Questions and answers