Home

NuDAQ® ACL-8454 User`s Manual

image

Contents

1. To manipulate the ACL 8454 users may understand how to write a hardware dependent low level program Using either assembly or high level language such as BASIC or C language can carry out the low level programming The following gives examples to show how to use programming language to access an add on VO card Getting Start Before programming the add on card should be correctly installed After installing the card the users should already understand how much system PC resources are used by this card such as I O address IRQ channels and even DMA channel etc The second step is to study the register format and the operation theorem of the card Then users can try to write low level programs to operate it Although the high level program library is available the low level programming can improve the efficiency and perform functions which the library does not support The low level programming is not difficult and may be necessary to understand Programming Language The programming language to be used is dependent on users familiarity and the system requirement No matter what kind of language is used the user must understand the syntax of the I O instructions to access the I O card The following sections introduce the syntax of the often used programming language In each section the write output port instruction and the read input port instruction are shown In the examples the base address of the I O card is assumed as H
2. step 5 Write and verify the control program for counter 1 step 6 Skip these steps step 7 The gate source of the two counters is enable always Note the jumper G1 and G2 should be removed and no external gate signals are used step 8 Connect the counter 2 output to external device The following block diagram illustrates the application step 9 Write and verify the control program Please refer the DEMO2 C source code Jumper Jumper LO ZP 8254 Chip 1 100 K Hz Figure 4 3 Example of frequency generator 2 4 6 Pulse Width Measurement Example To measure pulse width with AT lt 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 At 1 2M 5x10e 7 sec The count range for measuring pulse width is At lt pulse width lt At 65535 32 768 msec If the specification of the pulse width to be measured is in the Signal Connections amp Applications e 37 range the 2M Hz can be used Otherwise changing the base freguency of the counter The counter 3 is used in this example step 3 Set jumper CK3 for internal 2 M Hz clock source step 4 6 Skip these steps step 7 The external gate source is just the signal to be measured The width of the high pulse can be measured Note that if the pulse is shorter the time resolution is worse If the pulse is wider the limitation of the maximum pu
3. CLOCK1 ow llele I CLOCK2 CIKn H LAST CHANNEL IV EXTERNAL Il IV 2 Use internal clock source CLOCK2 I TN g I CLOCKI I CLOCK2 QO bees Clem T LAST CHANNEL IV EXTERNAL II IV 20 e Installations amp Configurations 3 Use cascaded clock source from the last channel I N I CLOCK1 Re I CLOCK2 fa Clk n IE LAST CHANNEL IV EXTERNAL II IV 4 Use external clock source ECLK n Il I CLOCK1 eas lela I CLOCK2 ell cikn TE LAST CHANNEL IV EXTERNAL II IV 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 Clock source of Reference number Default clock source counter timer of jumper CLK1 CLOCK1 Table 2 4 Reference Numbers of Clock Setting Jumpers Installations amp Configurations e 21 2 10 Gate Control Configurations The gate ntrol signals of the independent counters are internally pulled high hence they are default enabled if no external gate used When the external gate signals are used the counters can be used to measure pulse width Moreover the gate of counter 1 4 come from the reverse of counter 6 output by jumper selecting Therefore the time interval of the counter gate can be precisely controlled and freguency measurement is possibl
4. Including the signal connection between the ACL 8454 and external devices such as daughter boards or other devices 4 1 Connectors Pin Assignment The ACL 8454 comes equipped with a D type 37 pin female connector CN1 The CN1 is located at the rear plate The pin assignment of the connector is illustrated in the Figure 2 1 Refer to section 2 1 for details of pin assignment 4 2 Daughter Board Connection The ACL 8454 can be connected with daughter boards ACLD 9137 ACLD 9138 ACLD 9188 and DIN 37D to extend the bus Signal Connections amp Applications e 33 4 3 Digital I O Connection The ACL 8454 provides 16 digital input and 8 digital output channels through the connector CN1 The digital I O signals are fully TTL DTL compatible Digital Input DI From TTL Devices Digital Output DO To TTL Devices ACL 8454 Outside Device Figure 4 1 Digital VO Connections 4 4 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 applications you can follow the procedure to design your applications and connect the signals 1 Check if the frequencyof the clock source is fixed if answer is No then go to step 7 2 Calculate the frequency of clock according to your application and decide the clock source internal external or cascaded Then decided which counter is used 3 H internal cloc
5. be clocked at rates from DC to 5 MHz Each counter can be individually programmed with 6 different operating modes by appropriately formatted control words The most commonly uses for the 8254 in microprocessor based system are programmable baud rate generator event counter binary rate multiplier real time clock digital one shot motor control VO Address Each 8254 on ACL 8454 occupies 4 I O address as shown below BASE 40 LSB OR MSB OF COUNTER 0 BASE 1 LSB OR MSB OF COUNTER 1 Although there are at most four 8254 chips can be installed however only one chip can be selected at the same time The programming of 8254 is controlled by the registers BASE 0 to BASE 3 For more detailed information please refer to Intel s data sheet of 8254 chip see http support intel com support controllers peripheral 231164 htm 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 Appendix B imer Counter Operation e 57 Bit 7 6 5 4 3 2 1 0 sci sco Ru RLo Me Mi Mo BCD e SC1 amp SCO Select Counter Bit7 amp Bit 6 o 0 SelectCountero o 1 SelectCountert 1 0 SelectCounter2 e RL1 amp RLO Select Read Load operation Bit 5 amp Bit 4 o 0 COUNTERLATCH FOR STABLE READ o 1 READ LOADLSBONLY 1 0 READLOADMSBONLY e M2 M1 a
6. 166 Jian Yi Road Chungho City Taipei 235 Taiwan R O C Please inform or FAX us of your detailed information for a prompt satisfactory and constant service Detailed Company Information Company Organization Contact Person E mail Address EE Country NE 7 N EN Web Site aa eee Po estions i O Product Model 20S Computer Brand MB CPU Chipset Bios Video Card Network Interface Card Other Environment to Use Challenge Description Suggestions for ADLINK Contents How to Use This Guide esse see RR RR RR ERK RR ERK RR RR RR REK ERK RR ER iii Chapter 1 Introduction siek EEN ENE EA GERS Ke KEER 1 11 EE ENARE 4 12 ele ee EE 4 UC Wee le LEE 5 Chapter 2 Installation amp Configurations esse sesse ske Re EN 7 SCH What YOU Have ise pcre EE EE NE 7 2 2 UNPACKING EER ER wea EE EE Ee ER se ee oo Se Oe Dee Dee 8 2 3 PCB Layout of ACL 8454 ee ee ee ER Ee ee ee ee ER ee ee ee ee ee ee 8 2 4 Default ConfiguratiOnS eie ee ee RR RE ee Re de Ge ee 9 2 5 Base Address Getting AAA 10 2 6 Pin Assignment of Connector ese ee ee ee RR ee 12 2 1 Glock System EE RR SE Ee RE SR RE SN ee ENEE 13 2 8 Counters Architecture iii ees see ee RR ee RR Ee ee RR Ee ee ee 15 2 9 Clock Source Configurations ee see ee RR ee RR ee 18 2 10 Gate Control Confouratons i e ee ee RR ee RR Ee ee 22 2 11 Counter OUtputS EE ER ELE GE MEE Gee VR ee Re ARES 23 2 12 Interrupt SysteM AAA
7. 8 Connect the counter output to external device The following block diagram illustrates the application step 9 Write the control program Please refer the DEMO1 C source code d vm 8254 Chip 2 H HES cours Counter 4 o Figure 4 2 Example of freguency generator 1 Example 2 To generate a very low frequency of 1 pulse 1 hour step 1 To use fixed clock source because the output is a fixed frequency step 2 Because the desired frequency 1 3600sec 0 000278Hz is too slow to use one counter to generate Even if using cascaded counter architecture the clock frequency of the first stage counter must be as low as possible At first try to use internal clock Assume the clock of the first stage is 100 K Hz then the frequency divider value of the two cascaded counters is 100 K Hz 0 000278 Hz 360 000 000 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 36 e Signal Connections amp Applications Therefore user configurable cascaded counters can be used to solve this problem The counter 1 and 2 are used in this example step 3 Set jumper CK1 The clock source is internal CLOCK and it is set as 100 KHz in default Then set jumper CK2 and the clock source is coming for the output of the Last channel 1 step 4 Skip these steps
8. 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 reguest signal generated a software event is signaled So that in your program your can use wait operation to wait for the event When the event is signaled it means an interrupt is generated Please refer to the samples program 8454int c Note The W 8454 INT Enable and W 8454 INT Disable are a pair of functions That is as the W 8454 INT Enable is called the W 8454 INT Disable has to follow up behind it Otherwise the interrupt operation will not stop Syntax 54 e High Level Programming Microsoft C C Win95 amp Win NT int W_8454_INT_Enable int irq_no int iral HANDLE phEvent Visual Basic Win95 amp Win NT W 8454 INT Enable ByVal irq_no As Long ByVal irql As Long phEvent As Long As Long Arguments irq_no IRQ channel selected 1 Higher IRQ From COUT6 2 Lower IRQ From COUT12 or Ext Int irql The IRQ level of the IRQ channel specified in argument irq_no phEvent The handle of the event for interrupts signals Return Value NoError INT_Not_Set 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
9. Frequency The clock source of CLOCK1 can be set by jumper CLOCK1 The freguency could be 10 MHz or 2 MHz Figure 2 5 shows the jumper setting and the corresponding frequency The default setting of CLOCK1 is using 2 MHz CLOCK1 2 MHz CLOCK1 10 MHz CLOCK CLOCK1 10M OD ol 2M 10M lO ojo 2M Default Figure 2 5 Jumper setting of CLOCK1 CLOCK 2 Low Freguency The clock source of CLOCK2 can be set by jumper CLOCK 2 The frequency could be 1 MHz or 100 KHz which are divided from CLOCK The CLOCK 2 is provided for low frequency applications Figure 2 6 shows the jumper setting and the corresponding freguency The default setting of CLOCK2 is using 100 KHz CLOCK2 100 KHz CLOCK2 1 MHz CLOCK2 CLOCK2 1M oloo 100K 1M OOO 100K Default Figure 2 6 Jumper setting of CLOCK2 If user s application need a clock frequency lower than 100 KHz the first method is to use external clock source the second method is to use one counter to generate a frequency lower than 100 Khz then cascaded the low frequency signal to the other counter s clock source This cascaded counter configuration is feasible on the ACL 8454 by jumper setting See the next section for details of how to set cascaded counter 14 e Installations amp Configurations 2 8 Counters Architecture There are at most four 8254 chips on the ACL 8454 card The chip 1 U1 and chip 2 U2 are default mounted on the card therefore 6 counters are default on boar
10. Programming Win NT only When the software component installation process is completed and the system that ACL 8454 Library is installed on is Windows NT Setup will launch the Driver Registry Utility 8454Util exe for you to make the registry of the drivers that you want to perform interrupt operation The Driver Registry Utility first shows the following window If 8454 driver has been registered it will be shown on the Registered Driver list Exit This utility is used for 8454 device which will perform Interrupt Operation Registered Drivers e Modify Remove did Done If the ACL 8454 device DOES NOT want to perform interrupt operation please click Done or Exit to exit this utility Click New button and a Driver Configuration window appears for you to set IRQ levels and base address ACL 8454 can support two interrupt lines One is IRQ1 high IRQ from COUTE which is the reversed output of internal cascaded counters and the other is IRQ2 low IRQ from COUT12 which is from internal timer or external source ECLK10 The Driver Configuration window for ACL 8454 is High Level Programming e 45 Card Type 8454 Base Address 240H X IRQ1 15 v IRZ EN Cancel 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 addre
11. This function is used to stop a specified 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 amp Win NT 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 Counter number equals to 1 12 UINT CntrVal address to save the read back counter value Return Value No_Error No error Invalid Counter No CntrNo is out of range High Level Programming e 51 5 7 W 8454 DO Description To write an 8 bits data to the digital output port Syntax Microsoft C C Windows Win95 amp Win NT int W 8454 DO int DO Value Visual Basic Windows 3 11 Version W 8454 DO ByVal DO Value As Integer As Integer Win 95 or Win NT Version W 8454 DO ByVal DO Value As Long As Long C C DOS int 8454 DO int DO Value Arguments DO Value the value to write to digital output port only the 8 LSBs of the value are effective Return Value Always no error 5 8 W 8454 DI Description To read the data of the digital input port lt is possible to read the 8 LSBs 8 MSBs or read only one bit channe
12. and DIP switches on the card for your own applications The card s jumpers and switches are preset at the factory A jumper switch is closed sometimes referred to as shorted with the plastic cap inserted over two pins of the jumper A jumper is open with the plastic cap inserted over one or no pin s of the jumper Before changing the default configuration users must fully understand the operation of the ACL 8454 The setting and the basic operation theorem are discussed in this chapter It is recommended to refer chapter 3 for details of the registers and to refer chapter 4 for application notes Installations amp Configurations e 9 2 5 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 restricted by the following conditions 1 The base address must be within the range Hex 200 to Hex 3FF 2 The base address should not conflict with any reserved I O address 3 The base address must not conflict with any add on card on your own PC Please check your PC before installing the ACL 8454 The base address of ACL 8454 is selected by a 6 positions DIP switch S1 The default setting of base address is set to be HEX 240 All possible base address combinations are listed as Table 2 2 You may modify the base address if the default address has been occupied by another add on card ON s1 1 2 3 4 5 6 A 8 7 6 5 4 3 A3 A8 control the BASE VO add
13. 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 sources of the cascaded counters counter 5 6 11 and 12 are fixed CLO CLOGK2 Go CLK ECLKN o COULD O 18 e Installations amp Configurations Figure 2 12 Clock Source of Counter n Installations amp Configurations e 19 The two internal clock sources CLOCK1 and CLOCK2 come from the clock system see Clock System section The cascaded clock source comes from the output of the counter with smaller channel number For example the COUT1 is cascaded to source of CLK2 the COUTS3 is cascaded to source of CLK4 The exceptions are the cascaded source of CLK1 comes from COUT4 and the cascaded source of CLK7 comes from COUT10 The external clock source named as ECLK ncomes from the 37 pins connector Figure 2 13 demonstrates the clock source jumper setting counter channel 1 CLK1 by jumper CK1 In this figure the clock source comes from the internal source CLOCK Sources of CLK1 by setting jumper CK1 I NO fe I CLOCK1 CK1 He I CLOCK2 OO mM LAST CHANNEL COUT4 IV EXTERNAL ECLK 1 Il IV Figure 2 13 Setting the Clock Source of Counter 1 The jumper setting is flexible for user applications There are four kinds of configurations for every clock source jumper 1 Use internal clock source CLOCK I wu I
14. controlled or internal cascaded signal 8 digital output channels 16 digital input channels shared with the same signal lines with external gate control and external clock input Two interrupt sources The first interrupt source comes from output of counter 6 and this signal is jumper selectable to one of 4 IRQ channels The second interrupt source comes from either internal periodic or external source This signal is jumper selectable to one of 5 IRQ channels Synchronized 4 channels frequency measurement is possible 37 pin D type female connector AT Bus and compact size Half size only Applications Event counter Frequency generator Frequency synthesizer Pulse width measurement Low level pulse generator Time delay Industry automation Watchdog timer Laboratory and Industrial automation 4 e Introduction 1 3 Specifications Programmable Counter Timer e Device 8254 x 2 default or 8254 x 4 at most e Counters 16 bit down counter e Clock source internal clock external source or cascaded e Gate control default enable or external control Digital VO DIO e ofinputchannels 16 channels e of output channels 8 channels dedicated output e Electronics characteristics TTL compatible signal General Specifications e VO Base Address 8 consecutive address space e Interrupt IRQ IRQ 3 IRQ 15 9 levels jumper selectable e Connector 37 pin D type female connector e Operating Temperature
15. ee ee ee ee 49 5 6 W 8454 Stop COUTEL iese see eke ee ee AA ee ee ee ee 51 5 7 W 8454 DO 52 5 8 WeB4 4D lia n EE re ted Ee 52 5 9 8454 Mode Functions e aane ee ee ee AA A ee ee ee ee 53 5 10 W 8454 INT Enable iese ese ee ee ee Ee ee RR Ee ee ee AA ee ee RE ee ee ee 54 5 11 W 8454 INT Disable ie ee Ge ee ee ee ee 55 Appendix A Using of IRQ Channels RER se ee RR RR RR RE 56 Appendix B Timer Counter Operation sesse eek RR RE R 57 Product Warranty SerViCe sesse see ke RARR REKE KERR RR EER RR EER 60 ii e Contents 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 e Chapter 1 e Chapter 2 e Chapter 3 e Chapter 4 e Chapter 5 Introduction gives an overview of the product features applications and specifications Installation amp Configurations describes the operation method and multi functions of the ACL 8454 Users should read through this chapter to understand the configurations of the ACL 8454 The chapter will also teach user how to install the ACL 8454 Register Format describes the details of register format of the ACL 8454 this information is very useful for the programmers who want to control the hardware by low level programming Signal Connection amp Applications describes the connectors pin assignment and how
16. 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 Counter 1 is used as an example to count external event The clock source of counter 1 is the event signal and the frequency is not fixed step 2 6 Skip these steps step 7 The gate source is always enabled and the external gate must be removed step 8 Connect the signal according to Figure 4 7 step 9 Write the control program Please refer the DEMO5 C source code 40 e Signal Connections amp Applications Jumper CK1 8254 Chip 2 Event signal IRQ channel Watchdog Interrupt Figure 4 7 Example of event counter Signal Connections amp Applications e 41 4 9 Double Interrupt System One Internal plus one external interrupt sources The ACL 8454 provides double interrupt sources which are very useful in some application For example most of the application needs a watchdog timer to monitor the system periodically hence an IRO channel is used In addition the emergency control may be necessary hence an additional external IRQ channel is helpful to handle the situation Therefore double interrupt level is necessary The external interrupt source can be routed to COUT12 if 8254 chip 4 is not installed 8254 Chip 2 C Counter 6 Al mi je G IRQ channel Watchdog Interrupt COUT12 COUT12 Ext Clk JPS JP2 mmm IRO cha
17. to connect the outside signal and devices to from the ACL 8454 Some applications are also introduced High level Programming introduces the C language library for operating the ACL 8454 Some examples are shown too How to Use This Guide e iii 1 Introduction The ACL 8454 is a general purpose counter timer and digital VO 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 ACL 8454 12 has four 8254 chips 12 counters On ACL 8454 6 four counters are used for external signal two counters are cascaded as 32 bit timer On ACL 8454 12 eight counters are used for external signal the rest of the four counters are designed as two 32 bit cascaded counters This card has multi configurations The counters can be set as independent counters or cascaded counters The gate control of every counter comes from either external source or internal cascaded counter The clock source comes from either internal or external can be selected by jumper setting A 10 MHz oscillator is used as the base clock of internal clock sources It is possible to use this card on variety of powerful counter timer functions to match your industry and laboratory applications Users can set the configuration to fit the variety of applications such as timer event counter frequency gene
18. 0 C 60 C e Storage Temperature 20 C 80 C e Humidity 5 95 non condensing e Power Consumption 5 V 210 mA maximum e Dimension 163mm L X 108mm W Introduction e 5 2 Installation amp Configurations 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 The default setting of ACL 8454 is shown at the end of this chapter 2 1 What You Have In addition to this Users Manual the package includes the following items e ACL 8454 Enhanced Multi function Counter Timer Card e Utility amp Library Diskette or Manual amp Software Utility CD If any of these items is 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 Installations amp Configurations e 7 2 2 Unpacking Your ACL 8454 card contains sensitive electronic components that can be easily damaged by static electricity The card should be unpacked 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 damage Shipping and handling ma
19. 23 2 13 Digital Input and Output 25 2 14 Summary of Default Geng 25 2 15 Notes for Installing More 8254 Chips ees ee see ee ee 25 Chapter 3 Registers Format esse sk sk RE REK ER ERK KERR ER RR RE 27 SCT VO Fort Ge AR N EE EE 27 3 2 Timer Counter Registers issie ee ee RE ee RR ee RR Ee ee 28 3 3 Chip Select Heotster ee Ee ee RR EE ee RR ee RR ee 28 3 4 Digital Input Registers ie see ee RR ee RR ee RR Ee ee 29 3 5 Digital Output Register iese ee ee RR ee RR EE ee RR Ee ee ee 29 3 6 Low level Programming ee ee ee RR ee RR EA ee RR ee 31 Chapter 4 Signal Connections amp Applications 33 4 1 Connectors Pin Assignment ee ee ee RR Ee ee RR ee 33 4 2 Daughter Board Connection ee ee RR ee RR ee 33 4 3 Digital VO Connection ee ee RR EA ee RR ee RR ee 34 AA Timer Counter Connection ee ee RR ee RR ee 34 4 5 Frequency Generator 36 4 6 Pulse Width Measurement iii se ee ee RR ee RR Ee ee ee 37 Contents ei 4 7 Frequency Measurement iese es ee ee RE ee RR Ee ee RR Ee ee ee Re 38 487 Event es ii RR RE N ENEE EE te 40 4 9 Double Interrupt System ies see cece ee ee RR EE ee RR Ee ee RR Ee ee 42 Chapter 5 igh Level Programming issie RR KERR ER RR RE 43 2 1 Wistallation Ee EE nate EE BE oe EE EE ude Re EO a 43 5 2 W 8454 RE ee N RE EN 47 N de EE EE OE EE EE 48 5 4 W 8454 Write Coumnter ees ee Ee Ee Ee Ee ee Ee ee se ee 48 5 5 W 8454 Read Counter ees ee ee ee ee AA
20. 4 card is removed from the PC slot no power is applied and no external daughter board is attached Installations amp Configurations e 25 When plugging 8254 chips please check the pin of chips must not be fold and install the chip into the socket carefully After installing the chip please configure the jumper setting of the ACL 8454 card according to your application At first the clock source of counter 7 10 should be set The gate source of counter 7 10 cannot be configured however user should notice whether if any external gate source or digital signal is connected to the signals The un wanted signal may control the gate source of the counters can cause your application fail The low IRO 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 take care the issues mentioned above 26 e Installations amp Configurations 3 Registers Format This chapter describes details of the register format of the ACL 8454 This information is guite useful for the programmers 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 3 1 I O Port Address The ACL 8454 requires 6 consecutive addresses in the PC I O address space There are four 8254 chips in ACL 8454 however these 8254
21. EX 240 and the port of the register to be access is BASE 2 Assembly To write an output port out 240h value out 240h register To read an input port in A 240h Registers Format e 31 BASIC language To write an output port 10 BASE amp H240 20 VALUE amp H2F 30 OUT BASE 2 VALUE or 10 OUT amp H242 amp H20 To read an input port 10 BASE amp H240 20 VALUE INP BASE 2 or 10 VALUE INP amp H242 C language Borland C To write an output port define BASE 0x240 unsigned int Value 0x2F outportb BASE 2 Value or outportb 0x242 Ox2F To read an input port define BASE 0x240 unsigned int Value Value inportb BASE 2 or Value inportb 0x242 Perform Functions Users should study the operation theorem and the relative data sheet to understand how to operate this card and then use the low level programming to perform those functions Generally the DIO control can be easily performed by only a few instructions it is very suitable to use the low level programming As to the higher level functions such as the interrupt service routines pulse width measurement frequency measurement etc user may use the library or modify the examples to carry them out However fully understanding of the PC system is necessary for certain applications 32 e Registers Format Signal Connections amp Applications This chapter describes the connectors and some application wiring of the ACL 8454
22. G Figure 2 7 Block Diagram of the 8254 Counter 8254 Chip 2 8254 Chip 1 CLK4 z CLK1 Counter 4 G GATE Counter 14 S CLK2 Counter 5g GATE2 G CLK3 c Counter 6q GATE3 G 8254 Chip 4 8254 Chip 3 COUT11 Figure 2 8 Counters Architectural 16 e Installations amp Configurations COUT1 COUT2 COUT3 COUTZ COUT8 COUT9 Independent Counters Counter 1 4 amp Counter 7 10 The Counter 1 to Counter 4 and Counter 7 to Counter 10 are independent because the clock source and gate control of those counters can be set independently These 8 counters are named as independent counters 8254 Chip 1 CLK1 GATE1 S Counter 1 o COUI G Figure 2 9 Example of independent counters Cascaded Counters The connection of Counter 5 6 and Counter 11 12 are different with other independent counters These four counters are named as cascaded counters because the clock sources of counter 5 and 11 come from fixed 1 MHz and their output are cascaded to counter 6 and 12 respectively In fact counter 5 6 and counter 11 12 are designed for frequency divider by using 8254 s square wave generator mode The gates of these counters keep at H level for enabling counters all the time The COUT6 and COUT12 can precisely generate frequency upper to 250 KHz and lower to 0 000233 Hz Note that the signals COUT6 and COUT12 can also be used as interrupt source See Interrupt Sources sec
23. NuDAQ ACL 8454 Multi Functions Counter Timer Card User s Manual Copyright 1997 2000 ADLINK Technology Inc All Rights Reserved Manual Rev 1 31 September 6 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 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 NuIPCS NuDAM NuPRO are registered trademarks of ADLINK Technology 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 always the most important thing for ADLink Tech Inc If you need any help or service please contact us and get it http www adlink com tw service adlink com tw NuDAQ nudaq adlink com tw NuDAM nudam adlink com tw Technical pe NuPRO Sofware 866 2 80065877 9F No
24. called Syntax Microsoft C C Win 95 amp Win NT int W 8454 INT Disable intirag no Visual Basic Win 95 amp Win NT W_8454_INT_Disable ByVal irq_no As Long As Long Arguments irq_no IRQ channel selected 1 Higher IRQ From COUT6 2 Lower IRQ From COUT12 or Ext Int Return Value NoError INT_Not_Set High Level Programming e 55 Appendix A Using of IRQ Channels IRO Used by Level It is used by motherboard and not available on expansion slot 1 It is used by motherboard key board and not available on expansion slot 2 tis re directed from IROS COM2 RS 232 4 COM1 RS 232 it is usually occupied by mouse It is used by motherboard and not available on expansion slot Re direct to IRQ 2 It is used by motherboard math co processor and not available on expansion slot It is usually occupied by IDE master drive hard disk It is used the IDE slave drive usually CD ROM Remark The IRQ channels with mark cannot be used by ACL 8454 56 e Appendix A Using of IRQ Channels Appendix B Timer Counter Operation The ACL 8454 has at most four 8254 chips on board Refer to section 2 8 for the signal connection and the configuration of these counters The following sections are some brief concepts of the 8254 chip The 8254 Timer Counter Chip The Intel NEC 8254 contains three independent programmable multi mode 16 bit counter timers The three independent 16 bit counters can
25. chips use the same I O address Two chip select bits are used to select active chip The Table 3 1 shows the I O address of each register with respect to the base address VOAddress Write Read Mode Control ECLK1 4 ExtG1 4 Base 5 Digital Output DI high byte Table 3 1 VO Address Map of ACL 8454 Registers Format e 27 3 2 Timer Counter Registers Every 8254 occupies 4 I O address locations in the ACL 8454 as shown below Condensed information is specified in Appendix B Timer Counter Operation Users can refer to Tundra s website http www tundra com or Intel s data sheet for a fully descriptions of the 8254 features see http support intel com support controllers peripheral 231164 htm Note that only one 8454 chip can be enabled at the same time Address BASE 0 BASE 3 Attribute read write Data Format Counter 0 Register R W Counter 1 Register R W Counter 2 Register R W Base 3 8254 Mode Control Register W 8254 Read Back Register R 3 3 Chip Select Register Although there are at most four 8254 chips can be installed on board however only one 8254 can be selected at the same time The bits 0 1 of the chip select register CS1 and CSO are used to select 8254 chips Whenever a chip is selected active the 8254 I O address BASE 0 BASE 3 is selected by this chip The active chip is enabled by CSO and CS1 according the following table Address BASE 4 Att
26. connector see Pin assignment for corresponding signal pin number In addition the outputsignals may be used as clock sources or gate controls of the cascaded counters see the above sections It is possible to cascaded two counters by jumpers The counters output COUT6 COUT12 are also used as internal interrupt source refers to Interrupt System 2 12 Interrupt System 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 The high IRQ level is jumper wired to IRQ 10 15 and the low IRQ level is jumper wired to IRQ 3 9 The source of the high IRQ level comes from COUTE6 which is the reversed output of cascaded counters The reversed COUTG6 interrupt is very useful because the COUTG is also send to the gate control of counter 1 4 for frequency measurement While COUT6 is high the frequency measurement is counting When COUTE goes low the counting is ending and an interrupt is generated from interrupt system so that the software can sample and memorize the result of frequency measurement In watchdog application using reversed COUT6 has no problems because the frequency of COUT6 and reversed COUTG is the same The sources of the low IRQ level come from internal COUT12 or external ECLK10 source which are jumper sele
27. ctable by JP3 Note the COUT12 is not reversed counter output Installations amp Configurations e 23 Note The IRQ channels must not conflict with other add on cards on your PC IRQ X 15 12 11 10 COUTE Aododo o o ole High IRQ Level JP1 Ext Int COUT12 ECLK10 IRQ 3 5 6 7 9 ole al O O O O O 00000 Low IRQ Level JP3 JP2 Figure 2 15 Block diagram of interrupt system The default setting of the high and the low IRQ levels come from COUT6 and ECLK10 respectively The interrupt system on ACL 8454 is very flexible to use No matter under any system configuration it is possible to generate interrupt internally or externally In fact when chip 4 are not installed the COUT12 are floating and its corresponding pin in the connector can be used as digital input pin or external interrupt source Whenever 8254 chip 4 is installed it is an internal interrupt source otherwise it is used as an external clock source or just a digital input signal The following table lists the combinations of the interrupt sources The label means internal source and the label e means external source The label DI means the signal can be used as digital input pin dedicatedly Chip Chip Chip Chip IG OR e e IE Er ESE SS ERREECHEN 3 VI VV CT e Di userinstalled Lal yvy x v i i e userinstalled Table 2 6 Chips installation and interrupt sources 24 e Installations amp C
28. d It is possible to expand to four 8254 chips by plugging the additional chip 3 U3 and chip 4 U4 into ACL 8454 and totally 12 counters are available The default counters on chip 1 and 2 are labeled as counter 1 to counter 6 The expandable counters on chip 3 and 4 are labeled as counter 7 to counter 12 Some counters are default configured as independent counters and the others are default configured as cascaded counters Table 2 3 illustrates the relationship between the reference number of chips and the counters number Number Number Number Counter Installed Chip 1 Installed EES Counter 5 Installed Counter 26 6 Cascaded Counter 7 Independent Chip 3 U3 Counter 8 Independent Not installed Counter 9 Independent Chip 4 U4 Not Installed Counter 12 12 Cascaded Table 2 3 Default Counters Architecture Installations amp Configurations e 15 There are three signals 2 input 1 output for each counter a clock input signal a gate control signal and an output signal The Figure 2 7 illustrates the block diagram of the 8254 counter CLK1 CLK12 are clock sources and GATE1 GATE12 are gate control signals The COUT1 COUT12 are outputs of the counters The Figure 2 8 shows all the labels and the inter connection of the 8254 counters when all the 4 chips are installed The COUTS and COUT11 are used only for internal 8254 Chip Clock Source Input C Counter Timer Output Gate Control Input
29. e Figure 2 14 shows the jumper setting of gate control of counter 1 4 VCC ExtG n COUT 6 GATE n 1 Jumper NOT installed External gate control ExtGn VCC COUT 6 GATE n 2 Jumper installed Cascaded gate control Figure 2 14 Gate source of counter 1 4 The jumper setting is flexible for users applications 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 When the jumper installed the gate is cascaded from counter 6 output and the ExtG n signal is an output signal Note that the external gate source must NOT be used when cascaded gate source is used Table 2 5 shows the reference number of the gate control jumpers and its corresponding counter timer channels number The default setting of every jumper is also shown Jumper Label Gate source of counter timer Default gate ource GATE1 ExtG1 GATE2 GATE3 GATEZ 22 e Installations amp Configurations Table 2 5 Reference number of clock setting jumpers 2 11 Counter Outputs The timer counter output signals COUT n of 8254 are controlled by clock source gate control and software program All the outputs of the 8 independent counters are sent to the 37 pins connector directly The COUT6 and COUT12 of the two pairs of cascaded counters are also sent to connector Therefore totally 10 counter outputs are sent to
30. k source is used configure the CK n jumpers according the calculation in step 2 4 If external clock source is used to generate a clock source outside the board and check the frequency 5 If cascaded clock source is used to configure and program the cascaded timer to generate the desired clock source 6 If frequency of the clock is not fixed only external source can be used and then connect the external jump wires according your application 7 Decide the gate control source always enable externally control or cascaded controlled 8 Toconnect or configure the gate signal of counter timers 34 e Signal Connections amp Applications To program the counter timers using desired mode Signal Connections amp Applications e 35 4 5 Frequency Generator Example 1 To generate a 250 KHz Square Wave step 1 To use fixed clock source because the output is a fixed frequency step 2 Internal 2 MHz clock source is suitable to generate a 250 KHz square wave Use Counter 4 for this application 50 KHz 2 MHz 8 step 3 Set jumper CK4 The clock source is coming from internal CLOCK1 Note that the CLOCK1 must be set as 2 MHz However the CLOCK1 is shared with other counters You must consider the clock source of other counters which using CLOCK1 in the same time step 4 6 Skip these steps step 7 The gate source is always enabled Note the jumper G4 should be removed and no external gate is used step
31. l by the DI relative functions Syntax Microsoft C C Windows Win95 amp 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 int W 8454 DI but int Bit No Visual Basic Windows 3 11 Version W 8454 DI DI Value As Integer As Integer W 8454 DI L DI LValue As Integer As Integer 52 e High Level Programming W 8454 DI H DI HValue As Integer As Integer W 8454 DI bit ByVal Bit No As Integer As Integer Win 95 or Win NT Version W 8454 DI DI Value As Long As Long W 8454 DI L DI LValue As Long As Long W 8454 DI H DI HValue As Long As Long W 8454 DI bit ByVal Bit No As Long As Long C C DOS int_8454 DI UINT DI_Value int 8454 DI L UINT DI_LValue int 8454 DI H UINT DI HValue int 8454 DI bit int Bit No Arguments UINT DI Value the 16 bits digital input value of port BASE 4 and BASE 5 UINT DI_LValue the digital input value of port BASE 4 note that only the low 8 bits is effective 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 HO For 8454 DI bm Invalid Bit Number OxFF argument out of range 0 or 1 the return value of the digital input channel 5 9 8454 Mode Functions Description This is a macro in
32. lse width should be care step 8 The following block diagram illustrates the application step 9 Write the control program Please refer the DEMO3 C source code Jumper Jumper SE CK3 8254 Chip 1 2M Hz Polling Di for checking the end of a pulse A Figure 4 4 Example of pulse width measurement Signal to be measured lt Pulse Width gt gt 4 7 Frequency Measurement Example To measure frequency around 1 100 K Hz step 1 This application needs 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 On ACL 8454 internal gate control is possible The internal gate is coming from COUTE In this example the pulse generate is counter 6 and the counter 1 is used to measure freguency step 2 The maximum value of counting counter is no more than 65535 For measuring 100 K Hz freguency the time interval should be within 1 100 K Hz x 65535 0 655 sec If the time interval is wider then the measurement resolution is better however if time interval is too long the counting value will be overflow That means the low pulse width of counter 6 output should shorter than 0 655 sec User can try to generate the pulse by counter 6 38 e Signal Connections amp Applications by yourself step 3 Configure jumper CK1 The clock source is the signal to be measured step 4 6 Skip the
33. mp M0 Select Operating Mode Bit 3 Bit 2 amp Bit 1 16 BITS BINARY COUNTER BINARY CODED DECIMAL BCD COUNTER 4 DIGITAL The count of the binary counter is from 0 up to 65 535 and the count of the BCD counter is from 0 up to 9 999 Mode Definitions In 8254 six operating modes can be selected They are e Mode 0 Interrupt on Terminal Count e Mode 1 Programmable One Shot e Mode 2 Rate Generator 58 e Appendix C Timer Counter Operation e Mode 3 Square Wave Rate Generator e Mode 4 Software Triggered Strobe e Mode 5 Hardware Triggered Strobe All detailed descriptions of these modes are written in Intel s data sheet http support intel com support controllers peripheral 231164 htm Appendix C Timer Counter Operation e 59 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 warranty shall not apply to equipment that has been previously repaired or altered outside our plant in any way as to in the judgment of the manufacturer affect its reliability Nor will it apply if the equipment has been used in a manner exceeding its specificati
34. n Assignment of Connector CN1 12 e Installations amp Configurations The pin assignment of the 37 pins D type connector CN1 is shown in Figure 2 3 The abbreviations of signal names are listed in Table 2 3 The signal name conventions are used through this manual Some signal pins are multi function signals For example the ECLK10 are not only used as clock source of counter 10 but also be used as external interrupt source and be connected to digital input channel 2 71 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 CLOCKT1 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 channel Refers to next section for details of setting clock for each counter timer The crystal on ACL 8454 is 10 MHz which is the highest frequency of the card The maximum speed of the 8254 chips can run under 10 MHz As users plug the lower speed 8254 chips into ACL 8454 the lower frequency clock source should be used A frequency divider is used to generate 2MHz for such circumstance Notes Certain versions of 8254 or 8253 chips such as 8254 5 can run under only 2 MHz Figure 2 4 Clock system of ACL 8454 Installations amp Configurations e 13 CLOCKT1 High
35. ng As Long C C DOS int 8454 Write Counter int CntrNo int Mode unsigned int 48 e High Level Programming CntrVal Arguments int CntrNo Counter number equals to 1 12 int Mode Operation mode of counter equals to 1 6 unsigned int CntrVal The 16 bits counter value to write to the counter Return Value No_Error No error Invalid Counter No CntrNo is out of range Invalid Timer Mode Mode is out of range 5 5 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 amp Win NT int W 8454 Read Counter int CntrNo int Mode unsigned int CntrVal Visual Basic Windows 3 11 Version W_8454 Read_Counter ByVal CntrNo As Integer Mode As Integer CntrVal As Integer As Long Win 95 or Win NT Version W_8454 Read_Counter ByVal CntrNo As Long Mode As Long CntrVal As Long As Long C C DOS int _8454 Read_Counter int CntrNo int Mode unsigned int CntrVal Arguments int CntrNo Counter number equals to 1 12 int Mode Operation mode of counter equals to 1 6 UINT CntrVal address to save the read back counter value Return Value No_Error No error High Level Programming e 49 Invalid Counter No CntrNo is out of range 50 e High Level Programming 5 6 W 8454 Stop Counter Description
36. nnel External Interrupt Figure 4 8 Example of double interrupt system Two internal interrupt sources For certain application COUT6 is used to generate gate control pulse for measuring freguency and to generate interrupt too This internal IRO channel is used to calculate freguency data However another internal watchdog timer interrupt may be still necessary Users can install 8254 chip 4 to get one more pair of cascaded counters 11 12 The COUT12 can be used as watchdog interrupt source Therefore two internal interrupt sources are available 42 e Signal Connections amp Applications 5 High Level Programming 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 It is a good starting point for C language programmers who wish to modify the functions in the library In addition to library and source code some demonstrating programs are also included in the disk It will help you to understand the library more quickly Please refer to the demonstration examples in the software to get examples of the using of the library 5 1 Installation MS DOS Windows 3 1 Software Installation With ACL 8454 Lib
37. onfigurations When 2 default chips 1 and 2 are installed on ACL 8454 COUTG is internal but COUT12 can be used as external interrupt source ECK10 is still used as digital input pin If user installs the chip 3 by yourself the interrupt sources are in the same configuration as condition 1 When all 4 chips are installed COUT6 COUT12 are internal interrupt sources only ECLK10 can be used as external If user installs the chip 4 by yourself the interrupt sources are the same configuration as condition 2 2 13 Digital Input and Output To program digital I O operation is fairly straightforward The digital input operation is just to read data from the corresponding registers and the digital output operation is to write data to the corresponding registers The digital VO registers format are shown in section 3 11 It is not necessary to set any jumper for digital I O 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 CLOCK1n GATE n ExtGn Counter 5 and Counter 6 CLK5 1 MHz CLK6 COUTS5 GATE11 12 are default enable Counter 11 and Counter 12 CLK11 1 MHz CLK12 COUT11 GATE11 12 are default enable 2 15 Notes for Installing More 8254 Chips The user can install 8254 chips to ACL 8454 card by yourself Before install the additional 8254 chip please make sure the ACL 845
38. ons or if the serial number has been removed Seller does not assume any liability for consequential damages as a result from our products uses and in any event our liability shall not exceed the original selling price of the equipment The equipment warranty shall constitute the sole and exclusive remedy of any Buyer of Seller equipment and the sole and exclusive liability of the Seller its successors or assigns in connection with equipment purchased and in lieu of all other warranties expressed implied or statutory including but not limited to any implied warranty of merchant ability or fitness and all other obligations or liabilities of seller its successors or assigns The equipment must be returned postage prepaid Package it securely and insure it You will be charged for parts and labor if you lack proof of date of purchase or if the warranty period is expired 60 e Product Warranty Service
39. r As Integer Win 95 or Win NT Version 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 High Level Programming e 47 5 3 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 This macro is used by other functions in this library it may not necessary be used by users Syntax Microsoft C C DOS Windows Win95 amp Win NT Set_Chip int ChipNo Arguments int ChipNo chip number equal 1 to 4 Return Value No return value 5 4 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 Syntax Microsoft C C Windows Win95 amp Win NT int W 8454 Write Counter int CntrNo int Mode unsigned int CntrVal Visual Basic Windows 3 11 Version W 8454 Write Counter ByVal CntrNo As Integer ByVal Mode As Integer ByVal CntrVal As Integer As Integer Win 95 or Win NT Version W 8454 Write Counter ByVal CntrNo As Long ByVal Mode As Long ByVal CntrVal As Lo
40. rary amp Utility diskette 1 Turn your PC s power switch on 2 Put the ACL 8454 Library amp Utility diskette into your floppy drive A or B for DOS AADOSISETUP BAT for Win 3 1 A WIN31 SETUP BAT With CD ROM 1 Turn your PC s power switch on High Level Programming e 43 ND Put the CD ROM into your CD ROM drive Co Type the commands Dos X gt CD NUDAQISA 8454 DOS X NuDAQISA 8454 DOS gt SETUP x identifies the drive that contains the CD ROM After installation all the files of ACL 8454 Library amp Utility for DOS are stored in C ADLink 8454 DOS directory Windows 3 1 X gt CD NUDAQISA 8454 WIN31 X NuDAQISA 8454 DOS gt SETUP x identifies the drive that contains the CD ROM After installation all the files of ACL 8454 Library amp Utility for Windows 3 1 are stored in C ADLink 8454 W31 directory Win 95 Win NT Software Installation With ACL 8454 Library amp Utility diskette 1 Turn your PC s power switch on 2 Put the ACL 8454 Library amp Utility diskette into your floppy drive A or B for Win 95 A Win95 SETUP EXE for Win NT AAWInNTISETUP EXE With CD ROM step 1 Place the ADLink CD ROM into the appropriate CD drive step 2 If auto run setup program is not invoked automatically please execute X setup exe X indicates the CD ROM drive step 3 Select NUDAQISA gt ACL 8454 3 Win95DLL or NuDAQISA gt ACL 84543 WinNT DLL to install software 44 e High Level
41. rator pulse width measurement and frequency measurement The card also provides digital output and input port There are 8 digital output channels and these channels can be used to control the external devices There are digital input channels and these channels are shared the same signal lines with the external clock and the external gate signals Whenever the external clock or gate signals are not used they can be dedicatedly used as Di There are at least 8 D I bits under default Introduction e 1 setting of the ACL 8454 because only two 8254 chips are used 2 e Introduction ACL 8454 provides one interrupt signal which comes from one of four internal or external interrupt sources Three internal interrupt sources come from the counter output One external interrupt source shares with one DI pin The interrupt can be used for watchdog timer or other applications One of the 11 interrupt levels on the AT bus can be selected by setting jumper Figure 1 1 shows the block diagram of the ACL 8454 Figure 1 1 Block diagram of the ACL 8454 Introduction e 3 1 1 Features The ACL 8454 Counter Timer and digital VO Card provides the following advanced features 1 2 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 The gate signal is external
42. ress Figure 2 2 Default Base Address Setting 10 e Installations amp Configurations VO port 2 Address Hex AT ON ON ON ON ON ON 200 207 a ET ET Ze o E 0 1 Pate OFF OFF OFF 1 1 1 Gelee 1 EAESEIES EE ie ie ie ie OFF NEE AE AE AE AE AE N OFF OFF OFF OFF OFF OFF A8 is corresponding to PC Bus address lines 218 21F 240 247 default 248 24F EE Table 2 2 Possible Base Address Combinations Installations amp Configurations e 11 2 6 Pin Assignment of Connector CN1 GND DIO 20 GND ECLK1 DI0 2 O O 21 ExtG1 Dl4 couT1 3 O 22 ExtG2 DI5 ECLK2 DI1 4 O e ECLK3 DI2 ol O SE D12 O 24 ExtG3 D16 COUT3 6 OH O 25 ExtG4 DI7 ECLK4 DI3 7 O 26 COUT4 ECLK7 DI8 8 O O 27 ExtG7 DI12 COUT7 9 OH O 28 ExtGA DI13 ECLK8 DI9 10 O O 29 COUT8 ECLK9 DI10 11 O O 30 ExtG9 DI14 COUT9 12 O O 31 ExtG10 DI15 ECLK10 DI11 Eint 13 O O 32 COUT10 COUT6 14 O O 33 COUT12 Elnt Doo 15 O 34 Dot DO2 16 O 35 Dos Do4 17 O O 36 DOS Do6 18 O O 37 DO7 5V 19 OO Legend ECLKn External clock source for counter n ExtGn External gate signal for counter n COUTn Counter Timer output of counter n DO m Digital output port channel m DIm Digital input port channel m Eint External interrupt signal input Figure 2 3 Pi
43. ribute write only Data Format Ra AR IE ANS NIE VEE NES eo COENE chipa E EE Chip 2 o EE Chp 3 o 28 e Registers Format 3 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 amp ExtG 7 10 and the external clock signals ECLK 1 3 amp ECLK 7 10 The external clock source ECLK nand external gate control ExtG n can be read back from the DI ports When the external clock sources and the external gate signals are not used for counters these channels can be used as digital input signal dedicatedly For example the chip 3 and 4 are not installed under default configuration ECLK7 10 and external gate ExtG7 10 are not used hence the port BASE 5 can be used as a digital input port dedicatedly Even if these external clock or gate signals are used for counters the input port can still monitor their signal level Address BASE 4 amp BASE 5 Attribute read only Data Format N RE a AE IE HI KO De EES ld or EE ee es NE ee ee ee ee 3 5 Digital Output Register The register is a general purpose 8 bits digital output port These signals can be used to control external devices Address BASE 5 Attribute write only Data Format EER AR E E VN EES EE Registers Format e 29 Base 5 D07 Dos pes DOA pes Doz DOT 000 30 e Registers Format 3 6 Low level Programming
44. se steps step 7 Set the internal jumper G1 The gate is controlled internally step 8 The following block diagram illustrates the application step 9 Write and verify the control program The frequency of the signal is frequency counting value of counter 1 precise time interval Please refer the DEMO4 C source code Precise Time 8254 Chip 2 Interval frequency to be measured Jumper G1 H enable counter 1 Figure 4 5 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 This feature is very useful in control system Signal Connections amp Applications e 39 freguency to CK1 8254 Chip 1 be measured 8254 Chip m external gate control Figure 4 6 Example of frequency measurement 2 Note that the precise gate signal is not necessarily coming from the internal source The gate can be generated by any counter and route to gate of counters externally refer Figure 4 6 The frequency measurement application is quit complicate User should also be care of the frequency range to be measured then design a system according to the system specification 4 8 Event Counter Example To count external event
45. ss click OK to register the driver When you finish the driver register select Done or Exit to exit this utility To make the registered drivers work you have to re start Windows NT system Note If your device driver can not be started please check if the resources VO Port Address or IRQ Level conflict with other hardware device You can use 8454Util utility to change the resource setting After the ACL 8454 DLL for Win NT is installed this utility is located in lt InstallDir gt Util directory Win 95 amp Win NT After you complete the installation of ACL 8454 Library ACL 8454 s DLL 8454 DLL is copied to Windows System directory default is C Windows System for Win95 or CAWinnt System32 for Win NT The driver files for Win 95 w95_8454 VXD are copied to the Windows System directory default is CA Windows System or the driver files for Win NT DIO SYS and 8454 SYS are copied to the Windows NT System Drivers directory the default directory is C Winnt System32 Drivers 46 e High Level Programming 5 2 W 8454 Initial Description To initial the base address used which used by the following functions The default base address set in the library is 0x240 However you should call this function before using others functions Syntax Microsoft C C Windows Win95 amp Win NT int W 8454 Initial int base address Visual Basic Windows 3 11 Version W 8454 Initial ByVal base address As Intege
46. stead 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 names are designed for easy to memorize or to be referenced User can use these macros instead of using the 8454 Write_Counter function Syntax Microsoft C C Windows Win95 amp Win NT W 8454 Interrupt on TC CN Val W 8454 Write Counter CN 0 Val High Level Programming e 53 W 8454 One Shoot CN Val W 8454 Write Counter CN 1 Val W 8454 Sauare Wave CN Val W 8454 Write Counter CN 2 Val W 8454 Rate Generator CN Val W 8454 Write Counter CN 3 Val W 8454 GW Strobe CN Val W 8454 Write Counter CN 4 Val W 8454 HW_Strobe CN Val W 8454 Write Counter CN 5 Val C C DOS 8454 Interrupt on TC CN Val _8454 Write Counter CN 0 Val _ 8454 One Shoot CN Val 8454 Write Counter CN 1 Val _ 8454 Square_Wave CN Val 8454 Write Counter CN 2 Val 8454 Rate Generator CN Val 8454 Write Counter CN 3 Val _ 8454 GW Strobe CN Val 8454 Write Counter CN 4 Val _ 8454 HW Strobe CN Val 8454 Write Counter CN 5 Val Arguments int CN Counter number equals to 1 12 UINT Val The 16 bits counter value to write to the counter Return Value No_Error No error Invalid Counter No CntrNo is out of range Invalid Timer Mode Mode is out of range Example See DEMO C in library diskette 5 10 W 8454 INT Enable
47. tion for details The following figure demonstrates a set of cascaded counter counter 5 and 6 8254 Chip 2 Figure 2 10 Example of cascaded counter User Configurable Cascaded Counters Although there are two ascaded counter on board users may need more cascaded counters User can configure the jumper for the clock source of every independent counter Therefore the independent counter Installations A Configurations e 17 output can be cascaded to the next counter s clock source by jumper setting Figure 2 11 demonstrates an example of the user configurable cascaded counter Refer to next section for details of the clock source setting Multi Configurations The ACL 8454 provides multi configurations for many situations Users may need more independent counters for some applications Users can installed one more 8254 to chip 3 U3 by yourself to get 3 more independent counters It is also possible to install one more 8254 chip to 4 U4 and get one more set of cascaded counter or to get another internal interrupt source refer to section 2 11 The versatile configurations of ACL 8454 depend on user s applications You may also order the extent version named as ACL8454 12 On which all four chips are installed when shipping Cascaded Counters Output Jumper CK2 Figure 2 11 Example of user configurable cascaded counters 2 9 Clock Source Configurations For every independent counter four signals can
48. y 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 Again inspect the module for damage Press down on all the socketed IC s to make sure that they are properly seated Do this only with the module place 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 ACL 8454 2 3 PCB Layout of ACL 8454 Sikseraen Figure 2 1 PCB Layout of the ACL 8454 8 e Installations amp Configurations 2 4 Default Configurations To operate the ACL 8454 correctly users should understand the structure of ACL 8454 and details of the possible configurations The block diagram of the ACL 8454 is shown in chapter 1 It contains the clock system counter system interrupt system and address decoder etc The following sections describe the details and the default setting is list in Table 2 1 gt items Default Configuration Setting by 8254 chips U1 U2 installed U3 U4 not installed Clock Sources of Counters Internal Clock Source 1 CK n BE Counter 1 4 Interrupt Level 1 IRQ 15 Interrupt Level 2 Source of Interrupt Level 2 External Interrupt Sources JPS Table 2 1 Default Configuration of ACL 8454 You can change the ACL 8454 s default configuration by setting jumpers

Download Pdf Manuals

image

Related Search

Related Contents

Samsung GT-I5800 Керівництво користувача(Eclair)  rischio di incendio ed affidabilità dei materiali - Padis    OpenComms Nform Reference Manual  ESSENS Aloe Vera Soft Spray  PDF  5. Troubleshooting - e-Rusu  Electrolux ESI6542LOW dishwasher      

Copyright © All rights reserved.
Failed to retrieve file