Period measurement mode – Measurement Computing USB-CTR04 User Manual
Page 10

USB-CTR04 User's Guide
Functional Details
Totalize options that are specific to the counter gate signal (
CxGT
) are explained below.
Counter gate (CxGT) input mode options (Totalize mode)
Gate option
Description
Direction Control
Direction control allows CxIN to act as the pulse source and CxGT as the direction. By default, the
counter increments when CxGT =1 (high), and decrements when CxGT=0 (low).
Gating
Gating allows the CxGT input to gate the counter. By default, the counter is enabled when the
CxGT
signal is high. When the CxGT signal is low the counter is disabled, but holds the count
value.
Clear/Reload
Clears the count to zero unless counting in Range Limit mode.
If counting in Range Limit mode, the
CxGT
signal reloads the counter from the min limit
register.
Count Trigger
The counter starts counting when the CxGT input goes active. By default, active is on the rising
edge.
Period measurement mode
You can use the USB-CTR04 to measure the period of any signal at a counter input (
CxIN
). The device counts
the integral number of ticks that make up the period, and the data returned is always time measured in ticks.
Data sample errors come from two sources:
the sampling error caused by not being able to count a partial tick
the USB-CTR04 internal timebase inaccuracy.
The measurement period is the time from edge-to-edge, either both rising or both falling. Period data is latched
as it becomes available, and is acquired at the counter read rate.
Because updates occur only when another full period becomes available:
If the counter read period is faster than the input period, period values repeat in the acquisition. The bigger
the difference between the counter read period and the input period, the more period values are repeated.
If the counter read period is slower than the input period, then the acquisition misses some periods. The
bigger the difference between the counter read period and the input period, the more period values are
missed.
To obtain greater resolution, increase the counter read period, or use a period mode option.
The data returned is interpreted as time measured in ticks. This data represents the number of tick size intervals
counted during the period measurement.
Optionally, you can use the counter gate signal (
CxGT
) to gate the counter.
When
CxGT
is high, the counter is enabled.
When
CxGT
is low, the counter is disabled, but holds the count value.
The 96 MHz system clock is used as the timing source. Periods from sub-microsecond to many seconds can be
measured.
All period measurement mode options are software-selectable. Each period measurement option is explained in
the table below.
Period option
Description
Period mode
X1 – The measurement is latched each time one complete period is observed.
X10 – The measurement is latched each time 10 complete periods are observed.
X100 – The measurement is latched each time 100 complete periods are observed
X1000 – The measurement is latched each time 1000 complete periods are observed.
Tick size (period
resolution)
The tick size is a fundamental unit of time derived from the period of the 96 MHz system clock. Four
counter channel tick sizes are available – 20.83 ns, 208.3 ns, 2083.3 ns, and 20833.3 ns.
The USB-CTR04 internal timebase has an absolute accuracy of 30 ppm. The sampling error varies based on the
input frequency, selected tick size, and selected period mode. The absolute error is the root-sum-of-squares of
the two independent error sources.
10