Period mode, Pulse width measurement mode, Timing mode – Measurement Computing USB-1602HS-2AO User Manual
Page 23: Debounce function
USB-1602HS-2AO User's Guide
Functional Details
23
Counter mode
Description
Totalize
This mode allows the basic use of a 32-bit counter. The channel input increments the counter
upward.
When used as a 16-bit counter (counter low), one channel can be scanned up to an 8 MHz rate.
When used as a 32-bit counter (counter high), two sample times are used to return the full 32-bit
result. Therefore, a 32-bit counter can only be sampled at a 4 MHz maximum rate.
The counter counts up and does not clear on every new sample. However, it does clear at the start of
a new scan command. The counter rolls over on the 16-bit (counter low) boundary, or on the 32-bit
(counter high) boundary.
Clear on read
The counter counts up and is cleared after each read. By default, the counter counts up and only
clears the counter at the start of a new scan command. The value of the counter before it was cleared
is latched and returned.
Rollover
The counter continues to count upward, rolling over on the 16 or 32-bit boundary.
Stop at top
The counter stops at the top of its count. The top of the count is FFFF hex (65,535) for the 16-bit
mode, and FFFFFFFF hex (4,294,967,295) for the 32-bit mode.
16-bit or 32-bit
Sets the counter type to either 16-bits or 32-bits. The type of counter only matters if the counter is
using the Stop at all FFFFs mode; otherwise, this option is ignored. The 16 bit mode requires less
bandwidth for higher channels count and higher sample rates.
Period mode
This mode allows for period measurement of the channel input.
You can measure x1, x10, x100 or x1000 periods, and 16-bit (counter low) or 32-bit (counter high) values. Four
timebase, or tick-size, values are available (20.83 ns, 208.3 ns, 2.083 µs, or 20.83 µs). These values are based
on the 48 MHz system clock. Any other channel can gate the period measurement. All period mode options are
selectable with software.
Pulse width measurement mode
This mode is used to measure a channel's pulse width.
You can measure 16-bit or 32-bit values. Four timebase, or tick-size, values are available (20.83 ns, 208.3 ns,
2.083 µs, or 20.83 µs). These values are based on the 48 MHz system clock. Any other channel can gate the
pulse width measurement. All pulse width options are selectable with software.
Timing mode
This mode is used to measure the time between two subsequent events, such as the edge of one channel with
respect to the edge of another channel.
You can measure 16-bit or 32-bit values. Four timebase, or tick-size, values are available (20.83 ns, 208.3 ns,
2.083 µs, or 20.83 µs) . All timing options are selectable with software.
Debounce function
The USB-1602HS-2AO has debounce circuitry which eliminates switch-induced transients that are typically
associated with electro-mechanical devices including relays, proximity switches, and encoders.
All debounce options are selectable with software. You can select a debounce time, debounce mode, and rising-
edge or falling-edge sensitivity.
Each channel's output can be debounced with 16 programmable debounce times in the range of 500 ns to
25.5 ms).
There are two debounce modes, as well as a debounce bypass, as shown in Figure 12. The signal from the
buffer can be inverted before it enters the debounce circuitry. The inverter is used to make the input rising-edge
or falling-edge sensitive.
Edge selection is available with or without debounce. In this case the debounce time setting is ignored and the
input signal goes straight from the inverter or inverter bypass to the counter module.
The two debounce modes are trigger after stable and trigger before stable. In either mode, the selected
debounce time determines how fast the signal can change and still be recognized.