Home
4I22 COUNTER TIMER MANUAL
Contents
1. u WI oc ie EN E W3 E 4 A 2 W6 w7 wa C8 c9 05 0 E EX 5 Wi5 wis wo ug Den R28 TS R29 gt gt 9 Ub a w20 R34 D 07 bs ANS W22 ES W27 28 mE 2 08 oup A R43 1 5 Fl E LI Fa 4 5 E Un Ui2 n C24 C22 C23 ART REV 42 Page 11 4122 USER S MANUAL CONFIGURATION CLOCK SOURCE SELECTION Jumpers are provided on the 4I22 to allow selection of internal or external clock sources The internal clock source can be the 10 MHz time base or the output of counter 3C Counter 3C on the 4122 is used as a prescaler for the on card 10 MHz time base The other eight counters can use this internal clock source or use the external input pin Using the prescaled output is useful for generating long time delays or low frequency outputs CLOCK SOURCE JUMPERS The clock source jumpers select the internal clock when in the right hand position and the externalinput when in the left hand position Counter 1A WI Counter 1B WA Counter 1C W7 Counter 2A
2. ult 02 ul ART REV 12 Page 7 4122 USER S MANUAL CONFIGURATION BASE ADDRESS SELECTION The 4122 occupies 16 contiguous addresses in I O space The 4122 base address can be set at 8 different locations in the addressing range ofthe PC BUS ona 16 byte boundary Jumpers W24 W25 and W26 set the 4122 base address which is the address of the first 82C54 counter 1 The following table shows the possible base addresses W24 W25 W26 200H down down down 210H down down up 220H down up down 230H down up up 240H up down down 250H up down up 260H up up down 270H up up up Page 8 4122 USER S MANUAL CONFIGURATION LOCATION OF BASE ADDRESS SELECT JUMPERS uz CI AN P2 ae P 3 4 lI A o z W6 w7 wg 8 c9 05
3. 13 Interrupt Sele clon air iaa 14 I O CONNECTOR PINOUT Counter Timer connector POL Reus Uy A E dots age eee 15 ap hte ie dows idee aa al eade 16 INSTALLATION GO LIEN TTE UTILITIES 17 Connector orientation la di ds e Et 17 OPERATION General s scu iesus veras Lope 18 Deck OUt due DA Y UR QUIS qute 18 i jg ET 18 E EE AE A 19 InterruptselectONo veda na oes alitas tei 20 IntertuptopDonlatelt soe v De etie sena educ etr DoD pov eee pU Ue ues dide 21 4122 USER S MANUAL TABLE OF CONTENTS APPLICATION EXAMPLES EVO COMAS aoo tsp odds alate Altas 22 Frequency Counte DN E e edem 22 Squdte wave generatiotli precor hoes yee eee Pheer petas cli c d de 22 Digit lone Pm 25 Pulse widthmodulation ouod so du there da Seine canbe 23 Interrupt generation uibs a mate Pede cu ehe testate blot a een 23 REFERENCE INFORMATION Peces sue fie ee is 24 Wa 23 Schematic ua SAMS ean ose aA kia ois pat do olo a 26 4122 USER S MANUAL HANDLING PRECAUTIONS STATIC ELECTRICITY The CMOS
4. U2 e LE e PI 3 E E z W6 mm wa US 9 lt 15 w7 O cr 09 R28 w18 x mm UE c 215 R3I 3 k 3 R35 29 L E a W27 mm O 8 up 844 R43 H o 1 Fl S 1 015 ull ul2 uM J C24 C22 623 ART REV A 12 Page 13 4122 USER S MANUAL CONFIGURATION INTERRUPT SELECTION The outputs of counters 1A and 1B can be used to generate host interrupts Allinterrupt masking ORing and selection is accomplished with a hardware latch which is controlled by software No jumpers are required See operation section for information on controlling the interrupt features Page 14 4122 USER S MANUAL I O CONNECTOR PINOUT TIMER COUNTER CONNECTOR PINOUT The 4122 50 pin Counter timer port I O connector pinouts is as follows P2 CONNECTOR PIN SIGNAL PIN SIGNAL 1 OUT 3B 25 OUT 2A 3 GATE 3B 21 GATE 2A 5 CLOCK 3B 29 CLOCK 2A 7 OUT 3l OUT 1C 9 GATE 3A 35 GATE 11 CLOCK 3A 35 CLOCK 1 13 OUT 2C 37 OUT 1B 15 GATE 2C 39 GATE 1B 17 CLOCK 2C 41 CLOCK 1B 19 OUT 2B 43 OUT 1A 21 GATE 2B 45 GATE 1A 23 CLOCK 2B 47 CLOCK 1A 49 5V POWER All Even numbered pins are connected to ground Page 15 4122 USER S MANUAL I O CONNECTOR PINOUT PARALLEL PORT CONNECTOR PIN OUT The 4122 50 pin Parallel port I O connec
5. integrated circuits on the 4I22 can be damaged by exposure to electrostatic discharges The following precautions should be taken when handling the 4122 to prevent possible damage A Leavethe 4I22 in its antistatic bag until needed B All work should be performed at an antistatic workstation C Ground equipment into which 4122 will be installed D Ground handling personnel with conductive bracelet through 1 megohm resistor to ground E Avoid wearing synthetic fabrics particularly Nylon 4122 USER S MANUAL INTRODUCTION GENERAL The MESA 4122 is a 10 MHz nine channel universal counter timer card An on card 10 MHZ crystal oscillator is provided as a time base The 82C54 counters on the 4122 may be used for event counting frequency counting frequency generation pulse width modulators digital one shots interrupt timers and many other timing and counting applications Eight of the nine counters on the 4I22 have external clock gate and output connections The ninth counter is used as a optional 10 MHz time base prescaler for the other eight counters Gate and output polarity can be jumper selected as active high or low 24 general purpose I O bits are provided by a 82C55 PIA 3 3K Pullup resistors on the parallel I O simplify connection to contact closure Opto detector and open collector outputs All parallel port and timer inputs and outputs have interleaved grounds to reduce crosstalk Upto two ofthe counters may be
6. of this manual For complete information on these devices you should refer to the manufacturers data sheets The application examples assume that you have access to these data sheets Source and object code for all ofthe application examples are included on the 4122 utility disk RESET System reset forces the 4122 into a predefined state After a system reset all parallel I O pins are in the input mode and pulled high Both on card interrupts are disabled The counter timers on the 4122 have no external reset input and will be in an undefined state at power up Page 18 4122 USER S MANUAL OPERATION PORT MAPPING The following table shows the timer counter and parallel I O port locations With the base address set to BASE the 82C54 and 82C55 ports would be located as follows U2 82C54 1 Counter 1A BASE 0 Counter 1B BASE 1 Counter 1C BASE 2 Control Port BASE 3 05 82C54 2 Counter 2A BASE 4 Counter 2B BASE 5 Counter 2C BASE 6 Control Port BASE 7 U9 82 54 3 Counter 3A BASE 8 Counter 3B BASE 9 Counter 3C BASE A Control Port BASE U6 82C55 Port A BASE C Port B BASE D Port C BASE E Control Port BASE F Page 19 4122 USER S MANUAL OPERATION INTERRUPT SELECTION The outputs of counters 1A and 1B can be used to generate host interrupts Each counter output has an individual enabling mask IMASKA and IMASKB These masked outputs are then ORed together After reset the counter
7. outputs are masked off There are two modes of interrupt operation the normal mode and the shared mode The normal mode is selected by setting the interrupt mode to 1 IMODEO 1 and IMODEI 0 In the normal mode the ORed signalis connected to the selected interrupt line In the shared mode the interrupt used by the 4122 can be shared with another card in the system The shared mode is selected by setting the interrupt mode to 2 IMODEO 0 and IMODEI 1 In the shared mode when an interrupt occurs the interrupt line is pulled high open collector this allows another card in the system using the same mode to share the interrupt line either card can pull the line high In the shared mode you can enable a pulldown resistor IMODEO 1 and IMODEI 1 After reset the interrupt is disabled tristated IMODEO 0 and IMODEI 0 Finally this interrupt source can be routed to any ofthe PC 104 interrupt lines Using ISELO 3 Note If more than one interrupt source is routed to the same system interrupt line software must not enable more than one interrupt line driver at a time This applies to multiple sources on one card and any other interrupt sources in the system Page 20 4122 USER S MANUAL OPERATION INTERRUPT OPTION LATCH The interrupt options are controlled by latch bits which are located as follows BASE 8000H ISELO BASE 8001H ISEL1 BASE 8002H ISEL2 BASE 8003H ISEL3 BASE 8004H IMODEO BASE 8005H IMO
8. 4122 COUNTER TIMER MANUAL VERSION 1 0 Copyright 1997 by MESA ELECTRONICS Richmond CA Printed in the United States of America All rights reserved This document and the data disclosed herein is not to be reproduced used disclosed in whole or in part to anyone without the written permission of MESA ELECTRONICS Mesa Electronics 4175 Lakeside Drive Suite 100 Richmond CA 94806 1950 Tel 510 223 9272 Fax 510 223 9585 E Mail tech mesanet com Website www mesanet com 4122 USER S MANUAL TABLE OF CONTENTS HANDLING PRECAUTIONS Handling precautions tiras deed Du a ia 4 INTRODUCTION e fiera bet O aieo Meera Didi eppure flea 5 CONFIGURATION General id desee ehh aes cde te URINE 6 standard configuration cease easi 6 Default j mpersettings cites ao od ore rre RO AREE ERE 7 8 Location of base address select jul ii dada ia 9 Gate and output polarity selection antes 10 Location of Gate and output select jumpers 2 11 CIOCESOUTCESOlSC HOT Uode Macadam E Ete ebbe id 12 Clocksource UImpets y vo pon bb at hes pado e vatem pedes e 12 COCR les Melis tacet cu bec ete 12 Pes dure bero fads VES he Puget ee pn sia es 12 Location of Clock source and prescaler select
9. 9 WIO wil Eon 13 gt Wi5 wis wiz Cll CJ ci Q ug R28 Wis 19 2 mg o o 3 WS de R31 W20 R34 m 07 R3L 1 22 2 2 x gt 27 28 2 5 vo R44 R43 1 Fl gt p P D ART REV Page 9 4122 USER S MANUAL CONFIGURATION GATE AND OUTPUT POLARITY The polarity of the gate and output lines of counters 1A through 3B can be set with jumpers The gate inputs are normally active high that is a high level enables counting The output polarity depends on the counter mode The following table lists the jumper positions for gate and output polarity setting In all cases a jumper placed in the left hand position selects direct input or output while a jumper placed in the right hand position selects the inverted input or output GATE AND OUTPUT POLARITY SETTING JUMPERS GATE OUTPUT Counter 1A W2 W3 Counter 1B WS W6 Counter 1C W8 WO Counter 2A Wii W12 Counter 2B W14 W15 Counter 2C W17 W18 Counter 3A W20 W21 Counter 3B W23 W27 Page 10 4122 USER S MANUAL CONFIGURATION LOCATION OF GATE AND OUTPUT POLARITY JUMPERS
10. D TO ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS OR ADEQUACY FOR ANY PARTICULAR PURPOSE OR USE MESA ELECTRONICS SHALL NOT BE LIABLE FOR ANY SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES WHETHER IN CONTRACT TORT OR OTHERWISE If any failure occurs the following steps should be taken 1 Notify Mesa Electronics giving full details of the difficulty On receipt of this information service data or shipping instructions will be forwarded to you 2 On receipt of the shipping instructions forward the product in its original protective packaging transportation prepaid to Mesa Electronics Repairs will be made at Mesa Electronics and the product returned transportation prepaid Page 26 4122 USER S MANUAL REFERENCE INFORMATION SCHEMATICS Page 27
11. DEI BASE 8006H IMASKA BASE 8007H IMASKB ISELO 3 forms a binary number which is the interrupt number the source interrupt is routed to The default is interrupt 0 which is not connected Note that it is possible to select an interrupt number which does not connect to the PC 104 bus IMODEO 1 selects one of four interrupt modes as follows 0 Interrupts off default 1 Interrupts on 2 Shared interrupt no pulldown 3 Shared interrupt pulldown IMASKA and IMASKB are the masks for and OUT 1B respectively The default is both off Page 21 4122 USER S MANUAL APPLICATION EXAMPLES EVENT COUNTING Counter 1A is used in mode 0 for event counting When jumpered for NORMAL gate polarity the gate input can be left disconnected if not used You must change the default configuration of counter 1A in order to use the external clock input To do this move jumper W1 into the left hand position The example program EVECOUNT EXE resets the counter and then displays the current count on the console device Interrupts are not used and the counter wraps around at 65536 FREQUENCY COUNTER A four digit 10 MHz frequency counter can be configured using three ofthe counters on the 4122 plus the prescaler Counter 1B is used as a gate generator Counter 1B is set to mode 1 hardware triggerable one shot Counter 3C is used as a prescaler for counter 1B Counter 1C is used in mode 4 software triggered strobe as a trigger to
12. Input logic low 3 8 Input logic high 2 0 5 5 V Output low 4 2 5 mA sink Output high 3 0 2 5 mA source CLOCK ACCURACY Factory Trimmed 10 PPM 25 C Accuracy over temperature 1 PPM C ENVIRONMENTAL Operating temperature range I version 40 85 C C version 0 70 C Relative humidity 0 90 Percent Non condensing Page 25 4122 USER S MANUAL REFERENCE INFORMATION WARRANTY Mesa Electronics warrants the products it manufactures to be free effects in material and workmanship under normal use and service for the period of 2 years from date of purchase This warranty shall not apply to products which have been subject to misuse neglect accident or abnormalconditions ofoperation In the event of failure of a product covered by this warranty Mesa Electronics will repair any product returned to Mesa Electronics within 2 years of original purchase provided the warrantor s examination discloses to its satisfaction that the product was defective The warrantor may at its option replace the product in lieu ofrepair With regard to any product returned within 2 years of purchase said repairs or replacement will be made without charge If the failure has been caused by misuse neglect accident or abnormal conditions of operation repairs will be billed at a nominal cost IUE UE mi THE FOREGOING WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITE
13. W10 Counter 2B W13 Counter 2C W16 Counter 3A W19 Counter 3B W22 CLOCK PRESCALER Jumper W28 determines whether the internal clock source is the 10 MHz time base or the output of counter 3C When W28 is in the left hand position the 10 MHz time base is used as the internal clock When W28 is in the right hand position the output of counter 3C is used as the internal clock POWER OPTION Pin 49 on both of the 4122 I O connectors is connected to system 5V through a fuse This pin may be disconnected by removing the fuse F1 is the fuse for P2 and F2 is the fuse for P1 Note that the 5V fuse is rated at 1 Amp and can be replaced without soldering Replacement part number is LittleFuse PN 250001 Page 12 4122 USER S MANUAL CONFIGURATION LOCATION OF CLOCK SOURCE AND PRESCALER SELECT JUMPERS
14. generate the gate pulse Counter 1A is used as the frequency counter proper The 4122 configuration must be changed in order for the example program to work In addition external connections must be made to interconnect the appropriate counters The configuration changes from the default configuration are 1 Counter 1A clock source is external W1 in left hand position and 2 Counter output polarity is reversed W6 in right hand position The external connections to be made are 1 Connect counter 1A gate P2 pin 45 to counter 1B output P2 pin 37 and 2 Connect counter 1B gate P2 pin 39 to counter 1C output P2 pin 31 The frequency counter input is counter 1A clock P2 pin 47 The example program 4I22FREQ EXE sets the gate time to 100 ms allowing a maximum frequency read out of 655350 Hz with 10 hz resolution The frequency is displayed on the console There are some synchronization problems that prevent reliable cascading of counters when used with an asynchronous input and the internal gate Applications needing count resolution better that 65535 should use the interrupt output capability of counters 1A and 1B and let the host processor handle the counter overflow With the maximum 10 MHz input the interrupt rate would be approximately 153 Hz Alternatively an external gate can be used SQUARE WAVE GENERATION All counters can used to generate square waves with programmable frequencies at their outputs Counter mode 3 is used to gene
15. he output of counter 1A P2 pin 43 to the gate of counter 1B P2 pin 39 The example program 4122PWM EXE uses counter as the reference counter and counter 1B as the one shot timer The example program generates a 10 bit resolution PWM output with a slow up and down ramp from 1 1024 duty cycle to full scale always on and back again At 10 MHz a 10 bit resolution output would have a repetition rate of 9 77 kHz PWM outputs are suitable for high efficiency variable drive of integrating slow response loads Examples are DC motors solenoids incandescent lamps heaters etc INTERRUPT GENERATION The outputs of counters 1A and 1B can generate host interrupts This is useful for low overhead accurate time delays implementing high speed tick clocks interrupting the host on terminal count etc The example program 4I22INT EXE uses the counter 1A interrupt output and a command line specified bus interrupt In order for the example program to work you must have no enabled interrupt source on the selected interrupt The example program implements a 3 pps annoying beep background task Page 23 4122 USER S MANUAL Page 24 4122 USER S MANUAL REFERENCE INFORMATION SPECIFICATIONS MIN MAX UNIT POWER SUPPLY Voltage 4 5 5 5 V Supply current 75 mA no ext load BUS LOADING Input capacitance 15 pF Input leakage current 5 uA Output drive capability 150 pF Output sink current 12 mA I O PORT LOADING
16. rate square waves The example program 4122SQR EXE generates square waves on all outputs with frequencies descending by a factor of two from counter to counter Counter 1A starts at 1 KHz and counter 3B ends up at 7 8125 Hz Counter 3C is used as a prescaler Page 22 4122 USER S MANUAL APPLICATION EXAMPLES DIGITAL ONE SHOT Counters 1A through 3B can be used to generate an output pulse with programmable width Counter mode 1 hardware triggered one shot is used The example program 41220S EXE uses counter 1A An active low 100 mS pulse is generated on every rising edge of counter 1A s gate input P2 pin 45 PULSE WIDTH MODULATION Variable resolution pulse width modulation outputs can be generated by using one counter as a reference frequency generator in mode 2 or 3 and one or more counters in the one shot mode mode 1 The output ofthe reference counter connects to the gate input of one or more one shot counter s Unfortunately it is awkward to generate a O output as a 1 clock cycle pulse is the minimum pulse width in the one shot mode This is not a major problem in most real applications as the power driver circuit will not see the minimum width 100 nsec pulse The 4I22 configuration must be changed in order for the example program to work The configuration change from the default configuration is that the prescaler option is not used W28 in left hand position In addition an external connection must be made from t
17. tor pinouts is as follows CONNECTOR PIN SIGNAL PIN SIGNAL 1 Port C bit 7 3 Port C bit 6 Port C bit 5 7 Port C bit 4 9 Port C bit 3 11 Port C bit 2 13 Port C bit 1 15 Port C bit 0 17 Port B bit 7 19 Port B bit 6 21 Port B bit 5 23 Port B bit 4 25 Port B bit 3 27 Port B bit 2 29 Port B bit 1 31 Port B bit 0 33 Port A bit 7 35 Port A bit 6 37 Port A bit 5 39 Port A bit 4 4 Port A bit 3 43 Port A bit 2 45 Port A bit 1 47 Port A bit 0 49 5V POWER All Even numbered pins are connected to ground Page 16 4122 USER S MANUAL INSTALLATION GENERAL When the 4122 has been properly configured for its application it can be inserted into a PC 104 stack The standoffs should then be tightened to secure the 4122 in its place When the 4122 is secured in the stack the 50 pin headers can be plugged in from the sides I O CONNECTOR ORIENTATION The 50 pin connectors on the 4122 have their pin one ends marked with a white square on the circuit card This corresponds with the red stripe on typical flat cable assemblies If more positive polarization is desired center polarized IDC header connectors should be used These connectors will not fully mate with the pins on the 4122 if installed backwards A suggested center polarized 50 pin IDC header is AMP PN 1 746285 0 Page 17 4122 USER S MANUAL OPERATION GENERAL Detailed operational information on the 82C54 counter timer and 82C55 parallel port are beyond the scope
18. used to generate any ofthe XT or AT interrupts Page 5 4122 USER S MANUAL CONFIGURATION GENERAL The 4I22 s port address and polarity selection options are set with jumpers Each group of jumpers will be discussed separately by function In the following discussions when the words up down right and left are used it is assumed that the 4I22 card is oriented with its bus connectors and J2 at the bottom edge of the card nearest the person doing the configuration STANDARD CONFIGURATION The 4122 card is configured in the following manner when shipped from the factory This means that if you would like to verify card operation you should do it before you re configure the 4122 BASE ADDRESS 0200H GATE POLARITY NORMAL COUNTERS 1A THROUGH 3B OUTPUT POLARITY NORMAL COUNTERS 1A THROUGH 3B CLOCK SOURCE INTERNAL COUNTERS 1A THROUGH 3B CLOCK PRESCALER ENABLED CLOCK IS COUNTER 3C OUTPUT Page 6 4122 USER S MANUAL CONFIGURATION DEFAULT JUMPER SETTINGS w20 R34 E 18
Download Pdf Manuals
Related Search
Related Contents
ペッカ IHマット 小型遠隔電源制御キット2 Pyle PLMRA400 audio amplifier For Dummies Photoshop Elements 9 PB298Q Moniteur LCD Guide de l`utilisateur Copyright © All rights reserved.
Failed to retrieve file