background image

 

16 

 Installation 

be used as interrupt source.  See ‘Interrupt Sources’ section for 
details.  The following figure demonstrates a set of cascaded 
counter - counter #5 and #6.  

1 MHz

COUT5

Counter #5

COUT5

COUT6

Counter #6

8254 Chip #2

 C

 G

 C

 G

 O

 O

'H'

'H'

 

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.  User can configure the jumper for the 
clock source  of every independent counters.  Therefore, the 
independent counter output can be cascaded to the next counter's 
clock source by jumper setting.  Figure 2.11 demonstrate 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 which named as 
ACL8454/12 that all four chips are installed when shipping. 

CLK1

COUT1

GATE1

Counter #1

8254 Chip #1

 C

 G

 O

CLK2

COUT2

GATE2

Counter #2

 C

 G

 O

VCC

VCC

CLOCK1

Cascaded
Counters
Output

Jumper 'CK2'

 

Figure 2.11 Example of ‘user configurable cascaded counters’ 

Summary of Contents for NuDAQ ACL-8454

Page 1: ...N u D A Q ACL 8454 MultiFunctions Counter Timer Card User s Guide...

Page 2: ......

Page 3: ...s arising out of the use or inability to use the product or documentation even if ad vised of the possibility of such damages This document contains proprietary information protected by copyright All...

Page 4: ...O nupro adlink com tw Software sw adlink com tw AMB amb adlink com tw TEL 886 2 82265877 FAX 886 2 82265717 Address 9F No 166 Jian Yi Road Chungho City Taipei 235 Taiwan R O C Please inform or FAX us...

Page 5: ......

Page 6: ......

Page 7: ...ting 8 2 6 Pin Assignment of Connector 10 2 7 Clock System 11 2 8 Counters Architecture 12 2 9 Clock Source Configurations 17 2 10 Gate Control Configurations 19 2 11 Counter Outputs 20 2 12 DuaI Inte...

Page 8: ...surement 35 4 4 Frequency Measurement 36 4 5 Event Counter 38 Chapter 5 C C Library 39 5 1 Installation 40 5 2 W_8454_Initial 42 5 3 Set_Chip 43 5 4 W_8454_Write_Counter 44 5 5 W_8454_Read_Counter 45...

Page 9: ...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 Chapter 3 Registers Format describes the details of regi...

Page 10: ......

Page 11: ...ndependent 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...

Page 12: ...external interrupt source shares with one D I 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 Fig...

Page 13: ...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 I...

Page 14: ...of output channels 8 channels dedicated output Electronics characteristics TTL compatible signal General Specifications I O Base Address 8 consecutive address space Dual Interrupt IRQ Lower IRQ IRQ 3...

Page 15: ...t You Have In addition to this User s Manual the package includes the following items ACL 8454 Enhanced Multi function Counter Timer Card ADLINK CD If any of these items is missing or damaged contact...

Page 16: ...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 prop...

Page 17: ...xternal Gate G1 G4 Interrupt Level 1 IRQ 15 JP1 Interrupt Level 2 No Connection JP2 Source of Interrupt Level 2 External Interrupt Sources JP3 Table 2 1 Default Configuration of ACL 8454 You can chang...

Page 18: ...ppendix A 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 an 6 positions DIP sw...

Page 19: ...0 ON 0 OFF 1 ON 0 218 21F ON 0 ON 0 ON 0 ON 0 OFF 1 OFF 1 237 23F ON 0 ON 0 ON 0 OFF 1 OFF 1 OFF 1 240 247 default ON 0 ON 0 OFF 1 ON 0 ON 0 ON 0 248 24F ON 0 ON 0 OFF 1 ON 0 ON 0 OFF 1 3F0 3F7 OFF 1...

Page 20: ...al clock source for counter n ExtG n External gate signal for counter n COUT n Counter Timer output of counter n DO m Digital output port channel m DI m Digital input port channel m Eint External inte...

Page 21: ...is the highest frequency of the card The maximum speed of the 8254 chip can run under 10 MHz As users plug the lower speed 8254 chip into ACL 8454 the lower frequency clock source should be used A fr...

Page 22: ...en 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 se...

Page 23: ...Installation 13 reference number of chips and the counters number...

Page 24: ...12 Cascaded Table 2 3 Default Counters Architecture 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...

Page 25: ...and gate control of those counters can be set independently These 8 counters are named as independent counters CLK1 COUT1 GATE1 Counter 1 8254 Chip 1 C G O Figure 2 9 Example of independent counters...

Page 26: ...aded 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...

Page 27: ...the counter with smaller channel number For example the COUT1 is cascaded to source of CLK2 the COUT3 is cascaded to source of CLK4 The exceptions are the cascaded source of CLK1 comes from COUT4 and...

Page 28: ...e internal clock source CLOCK2 CLK n CK n I IV III II I CLOCK1 II CLOCK2 III LAST CHANNEL IV EXTERNAL 3 Use cascaded clock source from the last channel CLK n CK n I IV III II I CLOCK1 II CLOCK2 III LA...

Page 29: ...e 2 4 Reference Number of Clock Setting Jumpers 2 10 Gate Control Configurations The gate control signals of the independent counters are internally pulled high hence they are default enabled if no ex...

Page 30: ...l Gate source of counter timer Default gate source G1 GATE1 ExtG1 G2 GATE2 ExtG2 G3 GATE3 ExtG3 G4 GATE4 ExtG4 Table 2 5 Reference number of clock setting jumpers 2 11 Counter Outputs The timer counte...

Page 31: ...ssary 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 is available The revers...

Page 32: ...el Watchdog Interrupt JP1 COUT12 JP2 IRQ channel External Interrupt JP3 COUT12 Ext Clk Figure 4 8 Example of dual interrupt system Internal or External Interrupt Selection The interrupt system is very...

Page 33: ...ndition 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 conf...

Page 34: ...nstalling 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 8454 card is removed from the PC slot no power i...

Page 35: ...hould 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 Daughte...

Page 36: ...ress 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 chips use the same I O address Two chip select bits are used to...

Page 37: ...W Base 1 Counter 1 Register R W Base 2 Counter 2 Register R W Base 3 8254 Mode Control Register W 8254 Read Back Register R 3 3 Chip Select Register There are four 8254 chips on board However only one...

Page 38: ...nder 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...

Page 39: ...Registers Format 29 Bit 7 6 5 4 3 2 1 0 Base 5 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0...

Page 40: ...o 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 supp...

Page 41: ...or Value inportb 0x242 Perform Functions Users should study the operation theorem and the relative data sheet to understand how to operate this card then use the low level programming to perform those...

Page 42: ...r cascaded Then decided which counter is used 3 If internal clock 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 s...

Page 43: ...al gate is used step 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 2 M H...

Page 44: ...clock source is coming for the output of the Last channel 1 step 4 Skip these steps step 5 Write and verify the control program for counter 1 step 6 Skip these steps step 7 The gate source of the two...

Page 45: ...s 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 ca...

Page 46: ...nterval 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 th...

Page 47: ...ture is very useful in control system COUT n Counter n 8254 Chip m C G O H COUT1 Counter 1 8254 Chip 1 C G O Jumper CK1 frequency to be measured external gate control Figure 4 6 Example of frequency m...

Page 48: ...o 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 alwayse enable and the external gate must be...

Page 49: ...rding 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 f...

Page 50: ...lation all the files of ACL 8454 Library Utility for Windows 3 1 are stored in C ADLINK 8454 W31 directory uWin 95 Win NT Software Installation With CD ROM step 1 Place the ADLink CD ROM into the appr...

Page 51: ...e 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 interrupt lines One i...

Page 52: ...rectory Win 95 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 C Winnt System32 fo...

Page 53: ...base address is illegal 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 u...

Page 54: ...nt 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...

Page 55: ...r 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 numb...

Page 56: ...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 5 7 W_8454_DO Description To write a 8 bits data to the digital ou...

Page 57: ...Integer W_8454_DI_L DI_LValue As Integer As Integer 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...

Page 58: ...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 Invalid...

Page 59: ...454_Rate_Generator CN Val W_8454_Write_Counter CN 3 Val W_8454_SW_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...

Page 60: ...454int 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...

Page 61: ...signal generation Note This function has to be called after the W_8454_INT_Enable is called Syntax Microsoft C C Win 95 Win NT int W_8454_INT_Disable int irq_no Visual Basic Win 95 Win NT W_8454_INT_D...

Page 62: ...monly 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 For more information abo...

Page 63: ...Counter 2 1 1 ILLEGAL RL1 RL0 Select Read Load operation Bit 5 Bit 4 RL1 RL0 OPERATION 0 0 COUNTER LATCH FOR STABLE READ 0 1 READ LOAD LSB ONLY 1 0 READ LOAD MSB ONLY 1 1 READ LOAD LSB FIRST THEN MSB...

Page 64: ...Count Mode 1 Programmable One Shot Mode 2 Rate Generator Mode 3 Square Wave Rate Generator Mode 4 Software Triggered Strobe Mode 5 Hardware Triggered Strobe All detailed description of these six modes...

Page 65: ...its specifications 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...

Reviews: