background image

CNT24-4D(PCI)

24Bit Differencial Up/Down Counter Board

for PCI

User’s Guide

Summary of Contents for CNT24-4D(PCI)

Page 1: ...CNT24 4D PCI 24Bit Differencial Up Down Counter Board for PCI User s Guide ...

Page 2: ...nge without notice All relevant issues have been considered in the preparation of this document Should you notice an omission or any questionable item in this document please feel free to notify CONTEC Co LTD Regardless of the foregoing statement CONTEC assumes no responsibility for any errors that may appear in this document nor for results obtained by the user as a result of using this product T...

Page 3: ...ic bag to prevent damage in shipping Check the contents to make sure that you have everything listed above If you do not have all the items contact your distributor or CONTEC group office where you purchased Note Do not remove the board from its protective packaging until the computer case is open and ready for installation Electrical static can cause damage to electrical components ...

Page 4: ...dure 6 Setting One shot Pulse Output Signals 7 Setting Terminators 8 3 Board Setup 9 Use CONTEC Windows Software Products 9 When Not Using CONTEC Software for Windows 10 For Windows 98 Systems 10 For Windows 95 Systems 14 For other OS systems 19 4 Connection with External Devices 21 Interface Connector 21 Connecting the Interface Connector 21 Interface Connector Signal Assignment 22 PCB96WS and CC...

Page 5: ...6H CH2 0BH CH3 10H 34 Each Counter Operating Mode 36 Phase Z CLR Input Command CH0 02H CH1 07H CH2 0CH CH3 11H 40 Compare Register Command CH0 03H CH1 08H CH2 0DH CH3 12H 41 Digital Filter Command CH0 04H CH1 09H CH2 0EH CH3 13H 42 Count Value Latch Command 14H 43 Interrupt Mask Command 15H 44 Sense Reset Command 16H 44 Programmable Timer Command timer data 17H Timer start 18H 45 One shot Pulse Co...

Page 6: ...CNT24 4D PCI v Sense Port Command 16H 51 General purse Input Signal Select Command 1AH 52 Initialization 53 6 Board Specifications 55 Block Diagram 55 Specifications 56 7 Index 59 ...

Page 7: ...ure 4 6 TTL level input circuit and an example connection 25 Figure 4 7 Open collector output circuit and an example connection 26 Figure 4 8 TTL level output circuit and an example connection26 Figure 4 9 Example connection with a rotary encoder Line receiver input 27 Figure 4 10 Example connection with a rotary encoder TTL input 27 Figure 4 11 Example measures against voltage surges 28 Figure 5 ...

Page 8: ...nous clear 37 Figure 5 8 Example counting during asynchronous clear 38 Figure 5 9 Example counting when count input multiplication is set 39 Figure 5 10 Phase Z enable frequency ZSEL 0 Positive logic 40 Figure 5 11 Digital filter 42 Figure 6 1 Block Diagram 55 ...

Page 9: ...Counter operation modes 35 Table 5 4 Switching counting directions 35 Table 5 5 Phase Z input mode 40 Table 5 6 Digital filter clock settings 43 Table 5 7 Relationship between programmable timer setting data and timer interrupt cycles 46 Table 5 8 Relationship between specified one shot pulse width data and pulse widths 47 Table 5 9 Initialized state 53 Table 6 1 Specifications 56 ...

Page 10: ... to your system For details of CONTEC software products please contact our sales agencies Features The PCI bus compliant interface board can be used with the PC 98 series or PC AT DOS V machines equipped with a PCI bus expansion slot This single board can count up and down 24 bits for four channels The board can count two phase signals of a rotary encoder or linear gauge for example The board allo...

Page 11: ...e if the device has been tampered with or damaged through abuse mistreatment neglect or unreasonable use or if the original invoice is not included in which case repairs will be considered beyond the warranty policy How to Obtain Service For replacement or repair return the device freight prepaid with a copy of the original invoice Please obtain a Return Merchandise Authorization Number RMA from t...

Page 12: ...to be set before using the board Be sure to verify the switch before fitting the board into the slot Always be sure to set the switches and jumpers on the board as designated or it will fail Always be sure to connect only the designated signals to the connectors on the board or it will fail Install the board in the PCI expansion slot in the PC Do not insert or remove the board into or from the slo...

Page 13: ...mple Chapter 2 Setup Explains how to set up the board to use it Chapter 3 Board Setup Explains how to set up the board Chapter 4 Connection with External Devices Explains the interface connector and connection precautions Chapter 5 I O Port Bit Assignment Explains each I O register which the board uses bit assignment and bit definitions Chapter 6 Board Specifications Explains the specifications an...

Page 14: ...Setting CNT24 4D PCI 5 2 Component Locations and Setting Component Locations Figure 2 1 shows the names of major parts on the board Note that the switch setting shown below is the factory default Figure 2 1 Component Locations ...

Page 15: ... be set to a unique value A board ID can be set in a range of 0 through F and 16 boards can be distinguished at maximum When using only board its factory setting a board ID of 0 must be used Setting Procedure The board ID should be set with the rotary switch on the board Turn the SW1 twist knob to set the ID Factory setting board ID 0 SW1 BOARD ID 0 1 2 3 4 5 6 7 9 A B C D E F Figure 2 2 Board ID ...

Page 16: ...open collector output can be selected by channel By referring to the following table set the one shot pulse output signal SW2 ON 1 3 2 4 Factory Setting ON Figure 2 3 Switch for setting one shot pulse output signals Table 2 1 One shot pulse output signal settings Bit Channel TTL level output Open collector output 4 ch3 ON OFF 3 ch2 ON OFF 2 ch1 ON OFF 1 ch0 ON OFF ...

Page 17: ...lowing table set whether or not to insert terminators SW6 ch0 ON 1 3 2 4 SW5 ch1 ON 1 3 2 4 SW4 ch2 ON 1 3 2 4 SW3 ch3 ON 1 3 2 4 Factory Setting ON Figure 2 4 Terminator setting switches Table 2 2 Terminator settings Bit Input signal Insert terminator Do not insert terminator 4 General purpose U ON OFF 3 Phase Z ON OFF 2 Phase B ON OFF 1 Phase A ON OFF ...

Page 18: ... you to use our Windows software products optional Examples of CONTEC software products for Windows Driver Software Package Option API PAC W32 Please follow the setup instructions of the User s manual shipped with the software products and or the help files of the package to setup our interface board s to your system For details of CONTEC software products please contact our sales agencies ...

Page 19: ...m is turned on Under Windows 98 OS before using the board you should register the board information such as assigned resources to the OS This procedure is called hardware installation After the hardware installation is done Windows 98 can then manage the board information from its registers Following is hardware installation steps After finished the installation you are supposed to confirm the reg...

Page 20: ...t to continue 6 In the next dialog box select both of the Floppy disk drives F and Specify Location L check boxes then enter the drive name such as A and the directory name WIN95 into the Location field Insert the attached FD into the disk drive then click Next to continue 7 In the Windows driver file search for the device dialog box check that CONTEC Co Ltd Board Name and CNT_PI0 INF in the Locat...

Page 21: ...river you want then click Next to continue 8 From the Models window select CONTEC Co Ltd Board Name and click Next to continue 9 In the Windows driver file search for the device dialog box there should be the message of CONTEC Co Ltd Board Name and CONTEC INF in the Location of driver window after confirmed this message click Next to continue A number which is assigned by the OS will replace the m...

Page 22: ... remount one of them on the computer it is unknown that which one of the sets of resources previously assigned to the two boards is assigned to the remounted board In this case you must check the resource settings Checking resources Follow the steps below to check the assigned resources managed by the OS 1 Double click on the System option in Control Panel to open the System Properties property sh...

Page 23: ... you are supposed to confirm the registered board information from Windows 95 registers This procedure does not install board driver s Lately you should install driver program s yourself Procedure of Hardware Installation Checking the OS version The procedure of installing the board is different from the Windows 95 versions Before any installation you must check the version of Windows 95 that you ...

Page 24: ...ted the board installation you are supposed to confirm the registered board information from Windows 95 registers The Checking resources part of this section explains you how to do it For Windows 95 version 4 00 950B or 4 00 950C systems 1 Set the board ID 2 Be sure to check that the personal computer is off then plug the board into a PCI bus slot in the system 3 Turn the personal computer on to s...

Page 25: ...puter on again to start up Windows 95 6 Windows 95 will come up with the New Hardware detection dialog box In Multimedia Device Select which driver you want to install for your new hardware select Select from List 7 The Select Hardware Type dialog box will then appear In Select Hardware Type to Install windows select Other Devices 8 In the Select Device dialog box select CONTEC from Manufacturers ...

Page 26: ...pting to install the second one 3 Exit Windows 95 and turn the personal computer OFF 4 Check the board ID of the second board then plug it into a PCI bus slot Assign to the second board a board ID different from the ID assigned to the first board 5 Turn the personal computer on again to start up Windows 95 6 The OS will then automatically install the second board When the installation has been com...

Page 27: ...k the resource settings Checking resources Follow the steps below to check the assigned resources managed by the OS 1 Double click on the System option in Control Panel to open the System Properties property sheet Select the Device Manager tab 2 Click on the Multi function adapters folder 3 Click on the CONTEC Co Ltd Board Name folder to display its properties 4 Select the Resources tab to check t...

Page 28: ...the personal computer is off then plug the board into a PCI bus slot in the personal computer 3 Turn the personal computer ON to start up MS DOS 4 Copy the programs that are under the DOS directory of the attached FD to a directory of your HDD 5 Execute the CNTPCI EXE resource confirmation program 6 Check the I O addresses and interrupt level IRQ displayed on the screen Note When you use the board...

Page 29: ...Board Setup CNT24 4D PCI 20 ...

Page 30: ...ufacturer HONDA B48 B47 A48 A47 A2 A1 B2 B1 A B Connector Equ ivalent to the 17 JE 23370 02 D8C DD K Optional cable PCB96W S xx Connector PCR E9 6FA m anufacturer H O NDA Cable cover PCSE 96LKPA m anufacturer H O ND A Con nector installed on th e boa rd Equiva lent to the PCR E 96LM D man ufactu rer H ON DA xx represents a cable len gth 1 5m 3m or 5m CCB 9 6 O ptiona l cable PCB96PS xx Con nector ...

Page 31: ...e receiver B ph ase input CH 3 line receiver B ph ase in put CH 3 line receiver A ph ase input CH 3 line receiver A ph ase in put C H 2 line receiver general pu rpose input CH 2 line receiver general pu rpose in put CH 2 line receiver Z phase input CH2 line receiver Z phase input CH2 line receiver B phase input CH2 line receiver B phase input CH2 line receiver A phase input CH2 line receiver A pha...

Page 32: ...ceiver Z phase input CH1 line receiver Z phase input CH1 line receiver general purpose input CH1 line receiver general purpose input Ground Not connected PCB96WS s CNA and CCB96 s CN3 CNA Not connected CH0 one shot output CH1 one shot output CH2 one shot output CH3 one shot output Ground CH2TTLA phase input CH2TTLB phase input CH2TTLZ phase input CH2TTL general purpose input Ground CH3TTLA phase i...

Page 33: ...I 24 Connection of External Signals Line Receiver Input Circuit and an Example Connection Figure 4 5 Line receiver input circuit and an example connection Note The circuit for general purpose input signals is also configured similar to the above ...

Page 34: ...put signals is also configured similar to the above Keep the cable shorter than 1 5m In order to prevent noise from causing malfunctions keep the circuit as far away as possible from other wires or noise sources Output Circuit and an Example Connection When the count value of each channel matches any specified value the board outputs a one shot match signal for one pulse The SW2 allows you to sele...

Page 35: ...tput circuit and an example connection Note The output transistor on this board does not come with a voltage surge arrester To drive an inductive load such as a relay or a lamp you should provide measures against voltage surges on the load side For information on the countermeasures see section Measures Against Voltage Surges in Chapter 3 ...

Page 36: ...with External Devices CNT24 4D PCI 27 Example Connection with a Rotary Encoder Figure 4 9 Example connection with a rotary encoder Line receiver input Figure 4 10 Example connection with a rotary encoder TTL input ...

Page 37: ... strength may cause the transistor to deteriorate leading to its breakdown For this reason when driving an inductive load such as a relay coil be sure to connect a surge suppressor Example measures against voltage surges are shown next Example when a relay coil is use Example when a lamp is in use Diode Relay coil External supply voltage Zener diode voltage Zener diode Bypass resistor for dim ligh...

Page 38: ...ut data is output to and set in the register using the 1 port In the case of input data is read from the 1 port That is to say regardless of whether the process is input or output a command is output to output port 0 to enable each register to be set Data is output with the 1 port in order to set the data in the register or the register is read with the 1 port When setting data in each register be...

Page 39: ...of 24 bit data the command is output first from the 0 port and then the 1 port is output three times At this time the data is set in the order of lower middle and higher bytes The 1 port is read three times to read 24 bit data in the order of lower middle and higher bytes In a similar manner 32 bit data is set by outputting the 1 port four times from the lower bytes ...

Page 40: ... register Set value to compare count with Count latch command 14H Readout register Read count Command CH0 00H CH1 05H CH2 0AH CH3 0FH Count matches Match signal Sense port Command 16H Interrupt mask Command 15H Command CH0 01H CH1 06H CH2 0BH CH3 10H Status data One shot pulse output Command 19H Command CH0 03H CH1 08H CH2 0DH CH3 12H Figure 5 3 Count flow ...

Page 41: ...t value 10 CH3 operation mode 11 CH3 phase Z CLR input 12 CH3 compare register 13 CH3 digital filter 14 CH3 LT CH2 LT CH1 LT CH0 LT Count value latch 4 15 TIME CH3 CH2 CH1 CH0 Interrupt mask 5 16 TIME CH3 CH2 CH1 CH0 Sense reset 5 17 Timer data 32 18 START Timer start 1 19 One shot pulse 8 1A CH3 CH2 CH1 CH0 General purpose input signal select 4 Function bit CH0 initial count value Not in use CH0 ...

Page 42: ...5 CH1 count readout CH1 count value 24 06 AI Z A B 1 U D EQ U CH1 status data 8 0A CH2 count readout CH2 count value 24 0B AI Z A B 1 U D EQ U CH2 status data 8 0F CH3 count readout CH3 count value 24 10 AI Z A B 1 U D EQ U CH3 status data 8 15 0 0 0 TIME CH3 CH2 CH1 CH0 Interrupt mask 5 16 0 0 0 TIME CH3 CH2 CH1 CH0 Sense port 5 1A 0 0 0 0 CH3 CH2 CH1 CH0 General purpose input signal select 4 ...

Page 43: ...owing is an example program to set an initial count value of 100 64H for CH0 OUT Lead address 0H 00H select CH0 initial count value OUT Lead address 1H 64H lower OUT Lead address 1H 00H middle OUT Lead address 1H 00H higher Operation Mode Command CH0 01H CH1 06H CH2 0BH CH3 10H Output a command to output port 0 and set an operating mode with output port 1 RESET Clears the bit up down counter to 00...

Page 44: ...0 2 phase input Asynchronous clear Multiply by one mode 0 1 0 1 2 phase input Asynchronous clear Multiply by two mode 0 1 1 0 2 phase input Asynchronous clear Multiply by four mode 1 0 1 1 Single phase input Asynchronous clear Multiply by one mode 0 0 1 1 Single phase input with gate control attached Asynchronous clear Multiply by one mode 0 1 1 1 Single phase input with gate control attached Asyn...

Page 45: ...n takes place at the leading edge of phase A Figure 5 4 Example counting during 2 phase input Single phase Input During single phase input input of an UP pulse results in counting up while input of a DOWN pulse results in counting down If UP and DOWN pulses are simultaneously generated or both pulses change to LOW normal counting does not take place UP pulse Phase A UP DOWN pulse Phase B DOWN Coun...

Page 46: ...nter value to zero Figure 5 6 Example counting during single phase input with gate control attached Synchronous Clear When DIR and ZSEL are set to 1 the counter is cleared to zero at the leading edge of phase A when the phase B input is set to low and the phase Z input is set to high Counting begins from the leading edge of phase A that comes after the phase Z input is set to low Figure 5 7 Exampl...

Page 47: ...s of phase Z input status counting begins at the next leading edge of phase A 2 3 1 1 0 Phase A Phase A UP Phase B Phase B DOWN Phase Z Phase Z CLR Count value When DIR is set to 0 counting down takes place at the leading edge of phase A when phase B is set to low When ZSEL is set to 0 counting down is enabled when the phase Z input is set to low Figure 5 8 Example counting during asynchronous cle...

Page 48: ...ent CNT24 4D PCI 39 Multiplication of Count Input Setting the count input multiplication setting to two or four times enables you to fine tune controlling Figure 5 9 Example counting when count input multiplication is set ...

Page 49: ...put frequency with output port 1 ZE1 ZE0 phase Z input mode selection Table 5 5 Phase Z input mode ZE1 ZE0 0 1 Disable the phase Z input Set to this value when there is not phase Z 1 0 Enable the next phase Z input only once 1 1 Enable every phase Z input represents the initial state Status specified Figure 5 10 Phase Z enable frequency ZSEL 0 Positive logic ...

Page 50: ...12H Compare the count value of a corresponding channel with the compare register value If these two values match set status bit EQ to 0 remains 0 as long as they are in agreement This register is initialized to 0H Output the command to output port 0 and set the value to compare the count against with output port 1 Since the value to compare the count value against consists of 24 bits output three ...

Page 51: ...of four continuous clocks the digital filter outputs HIGH or LOW and communicates it to the counter circuit Output the command to output port 0 and set a sampling cycle with output port 1 The cycle can be set in a range of 0 1µsec through 1 056 1µsec All externally input signals except for general purpose input signals are fetched through the digital filter into the internal counter They are fetch...

Page 52: ...racy with respect to a set cycle is approximately 1 10 000 Digital filter clock cycle Input frequency D3 D2 D1 D0 Notes The initial state is set to 0 1msec When the cycle is not specified the cycle also defaults to 0 1msec A delay of more than four set cycle clocks may occur depending on noise If a level changes at a frequency faster than the set sampling clock cycle that level change is invalidat...

Page 53: ...nitial state is set to mask all channels with the timer 1FH Even in masked state each channel s count match and timer s time up statuses do change Sense Reset Command 16H 16H TIME Not in use CH2 CH1 CH0 CH3 D7 D6 D5 D4 D3 D2 D1 D0 During interrupt sensing an appropriate bit is set to 1 when the count of each channel matches or when the time set on the timer expires If the appropriate bit is set to...

Page 54: ...mes starting from the lower bits The timer can be set in a range of 1msec through 200sec To start the timer output timer start command 18H with output port 0 and set an appropriate bit to 1 with output port 1 To stop the timer set this bit to 0 The relationship between programmable timer setting data and timer interrupt cycles is as shown in Table 5 7 The following is an example program to set the...

Page 55: ... 10sec 1 1 E 1 A 2 F F 15sec 1 7 D 7 8 3 F F 20sec 2 3 C 3 4 5 F F 30sec 2 F A F 0 7 F F 40sec 3 B 9 A C 9 F F 50sec 7 7 3 5 9 3 F F 100sec B 2 D 0 5 D F F 150sec E E 6 B 2 7 F F 200sec Accuracy with respect to a set cycle is approximately 1 10 000 Programmable timer setting data H One shot Pulse Command 19H When the count value of each channel matches the value to compare against one shot pulses ...

Page 56: ...sec 0 0 1 1 0 0 0 1 31H Approx 20 07msec 0 1 0 0 1 0 0 1 49H Approx 29 9msec 0 1 1 0 0 0 1 0 62H Approx 40 14msec 0 1 1 1 1 0 1 0 7AH Approx 49 97msec 1 0 0 1 0 0 1 1 93H Approx 60 2msec 1 0 1 0 1 0 1 1 ABH Approx 70 04msec 1 1 0 0 0 1 0 0 C4H Approx 80 28msec 1 1 0 1 1 1 0 0 DCH Approx 90 11msec 1 1 1 1 0 1 0 1 F5H Approx 100 35msec 1 1 1 1 1 1 1 1 FFH Approx 104 45msec represents the initial sta...

Page 57: ...selects line receiver input or TTL input for the general purpose input signals of a corresponding channel when line receiver input is in use Output 1AH to output port 0 and set the input signal with output port 1 Set an appropriate bit to 0 to opt for line receiver input or to 1 to opt for TTL input Note The initial state is set to line receiver input 00H ...

Page 58: ...ss 0 0AH select the CH2 count value IN Lead address 1 lower IN Lead address 1 middle IN Lead address 1 higher In this case you need to set the CH2 count value latch to 1 in advance Status Data Command CH0 01H CH1 06H CH2 0BH CH3 10H Output the command to output port 0 and read input port 1 This allows you to monitor each signal input counting direction count matching and abnormal input statuses AI...

Page 59: ...nter is operating 0 Engaged in counting up 1 Engaged in counting down EQ Detects and outputs match or mismatch 0 The count value matches compare register s contents 1 The count value does not match compare register s contents U Indicates the general purpose input status 1 General purpose input status 1 0 General purpose input status 0 Notes The initial state varies with external connection states ...

Page 60: ...ate is set to 1FH Sense Port Command 16H Indicates the count match status of each channel and time up status Output 16H to output port 0 and read input port 1 This allows you to monitor sense port status TIME When the time set on the programmable timer expires this bit is set to 1 CH3 CH0 If the up down counter matches compare register s contents for each of CH3 through CH0 the bit for each corres...

Page 61: ...ow to reset the sense bit see Sense Reset for the output port General purse Input Signal Select Command 1AH D7 D6 D5 D4 D3 D2 D1 D0 1AH CH3 CH2 CH1 CH0 0 0 0 0 You can monitor the general purpose input signal of a corresponding channel to find whether it is set to line receiver or to TTL input when line receiver input is in use To monitor the setting output 1AH to output port 0 and read input port...

Page 62: ... CLR input 04H Enable phase Z only once Compare register 0 Readout register Not defined 24 bit up down counter 000000H Digital filter 00H 0 1 msec Status data 7BH When no external device is connected Count latch 00H Interrupt mask 1FH Inhibit all interrupts Sense port 00H Timer data 00000000H Timer start 00H Stop the timer One shot pulse 00H Do not output General purse Input Signal Select 00H Line...

Page 63: ...I O Port Bit Assignment CNT24 4D PCI 54 ...

Page 64: ... bit comparator 24 bit compare register One shot pulse output 20MHz system clock Line receiver input x 4 channels TTL level input x 4 channels One shot pulse output x 4 channels TTL level output or open collector output can be selected PCI Bus 16 bit sampling clock counter for digital filter Selector Digital filter Buffer Figure 6 1 Block Diagram ...

Page 65: ...41 T I Signal extension distance 1 5m dependent on wiring environment Response frequency Line receiver input Max 1 MHz 50 duty TTL level input Max 1 MHz 50 duty Interrupt Digital filter 0 1µsec 1056 1µsec can be independently set for each channel Timer 1msec 200sec Match signal output Output count One x 4 channels Output type Uninsulated open collector output or TTL level output Selectable by a sw...

Page 66: ...Board Specifications CNT24 4D PCI 57 External Dimensions 176 4 107 0 mm ...

Page 67: ...Board Specifications CNT24 4D PCI 58 ...

Page 68: ... Board ID 6 Board Setup 9 C Checking resources 13 18 Component Locations 5 F Features 1 H Handling Precautions 3 I Introduction 1 L Liability 3 O Obtain Service 3 S Setup 5 Support software 1 S Warranty 2 Windows 95 14 Windows 98 10 ...

Page 69: ...A 46 458 LZT0761 021018 001129 ...

Page 70: ...Kuro ku Seoul Korea Tel 82 2 2636 4277 8 Fax 82 2 2636 4279 E mail product conteck com CHINA INTERNATIONAL CONTEC TECHNOLOGY CO LTD B 8F Hua Tong Building No B19 Che Gong Zhuang West Road Hai Dian District Beijing 100044 China Tel 86 10 8801 8228 Fax 86 10 8801 8209 E mail ict ict com cn SHANGHAI CONTEC MICROELECTRONICS CORP No 481 Gui Ping Road Cao He Jing Hi Tech Park Shanghai 200233 China Tel 8...

Reviews: