3 general purpose timer/counter modes, General purpose timer/counter modes, Figure 3-11 – ADLINK USB-2401 User Manual

Page 49: Mode 1-simple gated-event calculation

Advertising
background image

Operation

39

USB-2401

3.6.3

General Purpose Timer/Counter Modes

Ten programmable timer/counter modes are available. All 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 different
modes are 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 calcula-
tion. 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-11: 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 software application. After software start, the
counter calculates the number of active edges on GPTC_CLK
between two active edges of GPTC_GATE. After the comple-
tion of the period interval on GPTC_GATE, GPTC_OUT out-
puts high and then current count value can be read by the

5

5

4

3

2

1

1

0

ffff

Gate

CLK

Count value

Software start

Advertising