©National Instruments Corporation4-1DAQ-STC Technical Reference Manual4General-Purpose Counter/Timer4.1 OverviewThis chapter presents information about the general-purpose counter/timer (GPCT) moduleof the DAQ-STC. The GPCT consists of two independent 24-bit up/down counters, each withassociated load and save registers, and a control structure for implementing some commoncounting and timing I/O functions. These timing functions include period measurement,pulsewidth measurement, event counting, single-pulse generation, and pulse-train generationwith programmable frequency and duty cycle (the percentage of the cycle that the pulse ishigh). Most functions can operate using only one general-purpose counter. There are twomodes of operation for the measurement functions—single mode and buffered mode. Insingle mode, the functions obtain only one measurement. In buffered mode, the functionsobtain a series of consecutive, gap-free measurements.You can select the GPCT input signals from any of the 17 external timing I/O pins on theDAQ-STC. Ten of these PFI lines are user-programmable I/O pins and are available on theI/O connector of the MIO-E Series boards. The remaining seven of the external timingI/O pins connect to the RTSI bus. Refer to Chapter 5, Programmable Function Inputs,and Chapter 6, RTSI Trigger, for more information on the timing I/O pins.The two counters are identical except for the internal routing of the counter outputs. Refer tosection 4.8, Detailed Description, for more information on the routing of the counter outputs.4.1.1 Programming the GPCTTo program the GPCT module of the DAQ-STC, read sections 4.2, Features, through 4.6,Programming Information. As you read the Programming Information section, you will needto refer to section 4.7, Timing Diagrams. You will also need to consult the register-levelprogrammer manual for the hardware containing the DAQ-STC.4.2 FeaturesThe GPCT module has the following features:• Two independent 24-bit binary up/down counters• Count up/count down control via hardware or software• Programmable counter source and gate selection from 17 signal sources