7 general purpose timer/counter modes, Mode 1: simple gated-event counting, Mode 2: single period measurement – ADLINK USB-1210 User Manual

Page 43: General purpose timer/counter modes, Figure 3-14, Mode 1-simple gated-event calculation

Advertising
background image

Operation & Calibration

33

USB-1210

All input/output signal polarities can be programmed by software
application. For brevity, all GPTC_CLK, GPTC_GATE, and
GPTC_OUT in the following illustrations are assumed to be active
high or rising-edge triggered.

3.1.7

General Purpose Timer/Counter Modes

Ten programmable timer/counter modes are available. All modes
initialize following a software-start signal set by the software. The
GPTC software reset initializes the status of the counter and
reloads the initial value to the counter. The operation remains
halted until software start is executed again. Operations under dif-
ferent modes are described as follows.

Mode 1: Simple Gated-Event Counting

In this mode, the counter calculates the number of pulses on the
GPTC_CLK after a software start. Initial count can be loaded from
the software application. Current count value can be read back by
software any time with no influence on calculation. GPTC_GATE
enables/disables calculation. When GPTC_GATE is inactive, the
counter halts the current count value. Operation in which initial
count = 5, countdown mode is shown.

Figure 3-14: Mode 1-Simple Gated-Event Calculation

Mode 2: Single Period Measurement

The counter calculates the period of the signal on GPTC_GATE in
terms of GPTC_CLK. The initial count can be loaded from the soft-
ware application. After software start, the counter calculates the
number of active edges on GPTC_CLK between two active edges

5

5

4

3

2

1

1

0

ffff

Gate

CLK

Count value

Software start

Advertising