![ADLINK Technology DAQ-2501 User Manual Download Page 49](http://html1.mh-extra.com/html/adlink-technology/daq-2501/daq-2501_user-manual_2852690049.webp)
40
Operation Theory
4.4 General Purpose Timer/Counter Operation
Two independent 16-bit up/down timer/counter are embedded in
FPGA firmware for users applications. They have the following
features:
X
Direction of counting can be controlled via hardware or soft-
ware.
X
Selectable counter clock source from either internal or
external clock up to 10MHz.
X
Programmable gate selection.
X
Programmable input and output signal polarities, either
active-high or active-low.
X
Initial Count can be loaded via software
X
Current count value can be read-back by software without
affecting circuit operation
Timer/Counter functions basics
Each timer/counter has three inputs that can be controlled via
hardware or software. They are clock input (GPTC_CLK), gate
input (GPTC_GATE), and up/down control input
(GPTC_UPDOWN).
The GPTC_CLK input acts as a clock source to the timer/counter.
Active edges on the GPTC_CLK input increment or decrement the
counter. The GPTC_UPDOWN input determines whether the
counter’s counting-up or counting-down. The GPTC_GATE input
is a control line, which acts as a counter enable or a counter trig-
ger signal in different modes.
The output of timer/counter is GPTC_OUT. After power-up,
GPTC_OUT is pulled high by a 10K resistor. GPTC_OUT goes
low after the DAQ board is initialized.
All the polarities of input/output signals can be programmed via
software. In this chapter, all timing figures assume that
GPTC_CLK, GPTC_GATE, and GPTC_OUT are set to be posi-
tive-logic. (i.e. they’re triggered on the rising-edge)