USB-CTR04-OEM
High-Speed Counter/Timer

User's Guide

Document Revision 2A
June 2015© Copyright 2015

Trademark and Copyright Information
Measurement Computing Corporation, InstaCal, Universal Library, and the Measurement Computing logo areeither trademarks or registered trademarks of Measurement Computing Corporation. Refer to the Copyrights &Trademarks section on mccdaq.com/legal for more information about Measurement Computing trademarks.
Other product and company names mentioned herein are trademarks or trade names of their respective
companies.
© 2015 Measurement Computing Corporation. All rights reserved. No part of this publication may be
reproduced, stored in a retrieval system, or transmitted, in any form by any means, electronic, mechanical, by
photocopying, recording, or otherwise without the prior written permission of Measurement Computing
Corporation.
NoticeMeasurement Computing Corporation does not authorize any Measurement Computing Corporation product for
use in life support systems and/or devices without prior written consent from Measurement Computing
Corporation. Life support devices/systems are devices or systems that, a) are intended for surgical implantation
into the body, or b) support or sustain life and whose failure to perform can be reasonably expected to result ininjury. Measurement Computing Corporation products are not designed with the components required, and are
not subject to the testing required to ensure a level of reliability suitable for the treatment and diagnosis ofpeople.

HM USB-CTR04-OEM.docx

Table of Contents
Preface

About this User's Guide ....................................................................................................................... 4
What you will learn from this user's guide ......................................................................................................... 4
Conventions in this user's guide ......................................................................................................................... 4
Where to find more information ......................................................................................................................... 4
Chapter 1

Introducing the USB-CTR04-OEM ....................................................................................................... 5
Functional block diagram ................................................................................................................................... 5
Chapter 2

Installing the USB-CTR04-OEM ........................................................................................................... 6
Unpacking........................................................................................................................................................... 6
Downloading the software .................................................................................................................................. 6
Installing the hardware ....................................................................................................................................... 6
Chapter 3

Functional Details ................................................................................................................................. 7
External components .......................................................................................................................................... 7
Header connectors............................................................................................................................................................. 7
LED indicators .................................................................................................................................................................. 8
USB connector .................................................................................................................................................................. 8Counter I/O and gating ....................................................................................................................................... 8Counter input modes ......................................................................................................................................................... 9
Debounce filters ...............................................................................................................................................................12

Digital I/O ......................................................................................................................................................... 15
Pull-up/down jumper .......................................................................................................................................................15

Timer output ..................................................................................................................................................... 16
Trigger input ..................................................................................................................................................... 17External clock pacing ....................................................................................................................................... 17Power ................................................................................................................................................................ 17
Ground .............................................................................................................................................................. 17
Mechanical Drawings ....................................................................................................................................... 18
Chapter 4

Specifications ......................................................................................................................................19
Counter ............................................................................................................................................................. 19
Timers ............................................................................................................................................................... 20
Digital input/output........................................................................................................................................... 20
External trigger ................................................................................................................................................. 21
External clock input/output............................................................................................................................... 21
Memory ............................................................................................................................................................ 22Power ................................................................................................................................................................ 22
USB .................................................................................................................................................................. 22
Environmental .................................................................................................................................................. 22
Mechanical ....................................................................................................................................................... 22
Header connector .............................................................................................................................................. 23
Header pinout ................................................................................................................................................... 233

Preface

About this User's Guide
What you will learn from this user's guideThis user's guide describes the Measurement Computing USB-CTR04-OEM data acquisition device and lists
device specifications.

Conventions in this user's guide
For more information
Text presented in a box signifies additional information and helpful hints related to the subject matter you arereading.
Caution! Shaded caution statements present information to help you avoid injuring yourself and others,
damaging your hardware, or losing your data.
bold text

Bold text is used for the names of objects on a screen, such as buttons, text boxes, and check boxes.

italic text

Italic text is used for the names of manuals and help topic titles, and to emphasize a word or phrase.

Where to find more information
Additional information about USB-CTR04-OEM hardware is available on our website at www.mccdaq.com.
You can also contact Measurement Computing Corporation with specific questions.


Knowledgebase: kb.mccdaq.com
Tech support form: www.mccdaq.com/support/support_form.aspx
Email: techsupport@mccdaq.com
Phone: 508-946-5100 and follow the instructions for reaching Tech Support

For international customers, contact your local distributor. Refer to the International Distributors section on our
website at www.mccdaq.com/International.

4Chapter 1

Introducing the USB-CTR04-OEM
The USB-CTR04-OEM is a USB 2.0 high-speed data acquisition device that provides the following features:







Four counter I/Oo High-speed pulse counter for general counting applications; multiple counting modes supported
o 48 MHz, programmable resolution up to 64-bits
o An aggregate scan rate of 8 MB/s
Four PWM timers with count, period, delay, and pulse-width registers
Eight individually-configurable digital I/O channels
External clock input and internal clock output
External digital trigger; software-selectable for edge or level sensitive, rising or falling edge, high or low
level

The USB-CTR04-OEM is a USB 2.0 high speed device that is compatible with USB 3.0 ports. The device isalso compatible with USB 1.1 ports, but use with this older hardware is not recommended due to longer
initialization times that can occur when the USB-CTR04-OEM is connected through USB 1.1 ports or hubs.
I/O connections are made to two banks of header connectors. The USB-CTR04-OEM is powered by the 5 volt
USB supply from your computer.
Caution! There are no product safety, electromagnetic compatibility (EMC), or CE marking complianceclaims made for the USB-CTR04-OEM. The USB-CTR04-OEM is intended for use as acomponent of a larger system. MCC can help developers meet their compliance requirements. The
end product supplier, however, is responsible for conforming to any and all compliancerequirements.

Functional block diagram
Device functions are illustrated in the block diagram shown here.

Figure 1. USB-CTR04-OEM functional block diagram

5Chapter 2

Installing the USB-CTR04-OEM
UnpackingAs with any electronic device, you should take care while handling to avoid damage from static
electricity. Before removing the device from its packaging, ground yourself using a wrist strap or by simply
touching the computer chassis or other grounded object to eliminate any stored static charge.
Contact us immediately if any components are missing or damaged.

Downloading the software
Refer to the USB-CTR04-OEM product page on the Measurement Computing website for information about the
supported software you can download.
Install the software before you install the hardware
The driver needed to run the USB-CTR04-OEM is installed with the software. Therefore, you need to install thesoftware package you plan to use before you install the hardware.

Installing the hardware
Connect the USB-CTR04-OEM to a to an available USB port on the computer running Windows, connect theUSB cable to an available USB port on the computer or to an external USB hub connected to the computer.
Connect the other end of the cable to the USB connector on the device. No external power is required.
When connected for the first time, a Found New Hardware dialog box opens when the operating system detects
the device. When the dialog box closes, the installation is complete. The Status LED turns on after the device issuccessfully installed (see Figure 2 on page 7).
If the Status LED turns off
If communication is lost between the device and the computer, the Status LED turns off. To restore
communication, disconnect the USB cable from the computer and then reconnect it. This should restore
communication, and the Status LED should turn on.

6Chapter 3

Functional Details
External components
The USB-CTR04-OEM has the following external components, as shown in Figure 2.
Two header connector banks
Device Status and Activity LEDs
USB connector
Pull-up/down jumper

1
2
3

Header connectors 1 to 28
Pull-up/down jumper
Header connectors 29 to 56

4
5

Status (top) and Activity (bottom) LEDs
USB connector

Figure 2. USB-CTR04-OEM components

Header connectors
The device has two banks of header connectors that provide the following connections:











Four counter inputs
Four counter outputs
Four counter gates
Eight DIO
Four timer outputs
External trigger input
External clock inputInternal clock output
Power output
Digital grounds
7USB-CTR04-OEM User's Guide

Functional Details

The USB-CTR04-OEM pinout is shown below.
Pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

Signal name
C0IN
C0GT
GND
C0O
C1IN
C1GT
GND
C1O
C2IN
C2GT
GND
C2O
C3IN
C3GT
GND
C3O
N/C
DIO0
DIO1
DIO2
DIO3
GND
GND
DIO4
DIO5
DIO6
DIO7
GND

Pin description
Counter 0 input
Counter 0 gate
Digital ground
Counter 0 output
Counter 1 input
Counter 1 gate
Digital ground
Counter 1 output
Counter 2 input
Counter 2 gate
Digital ground
Counter 2 output
Counter 3 input
Counter 3 gate
Digital ground
Counter 3 output
No connection
DIO bit 0
DIO bit 1
DIO bit 2
DIO bit 3
Digital ground
Digital ground
DIO bit 4
DIO bit 5
DIO bit 6
DIO bit 7
Digital ground

Pin
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

Signal name
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
TMR0
TMR1
GND
TMR2
TMR3
TRIG
GND
CLKI
GND
CLKO
+VO

Pin description
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
Timer 0 output
Timer 1 output
Digital ground
Timer 2 output
Timer 3 output
Trigger input
Digital ground
External clock input
Digital ground
Internal clock output
User voltage output

LED indicators
The device has two LED indicators – Status and Activity.
The Status LED (top) turns on when the device is detected and installed on the computer.
The Activity LED (bottom) blinks when data is transferred, and is off otherwise.

Refer to Figure 2 on page 7 for the location of these LEDs.

USB connector
The USB connector provides 5 V power and communication.

Counter I/O and gating
The USB-CTR04-OEM has a counter input (CxIN), counter output (CxO), counter gate (CxGT) pin for each ofits four counter channels.
Counter inputs can be read asynchronously under program control, or synchronously as part of a digital scangroup. In both cases, you can configure counters so that they:

get set to 0 after each readcount up or down and then roll over at a user-set limit
count until the user-set limit has been reached.

Counter inputs can concurrently monitor time periods, frequencies, pulses, and other event-driven incremental
occurrences directly from pulse-generators, limit switches, proximity switches, and magnetic pick-ups.

8

USB-CTR04-OEM User's Guide

Functional Details

Counter outputs can be used to control or transmit signals to external devices, and also to
USB-CTR04-OEM counter inputs, counter gates, or digital inputs. Counter outputs are commonly used in
Totalize mode.
Counter gates use input signals to clear a counter, change counter direction, or start/stop counting. Gate options
are software-selectable and are available when counting in Totalize mode.

Counter input modes
The USB-CTR04-OEM supports the following counter input modes:

Totalize
Period measurement
Pulse-width measurement
Timing measurement

Counter input modes are programmable with software. Some modes include software-selectable max limit andmin limit register values . These values do not directly affect the current count, but set limits in some modes todetermine counter behavior.
Each mode supports additional counter operation options. Refer to the discussion of each counter mode in thepages that follow for specific information.
Totalize mode
You can use the USB-CTR04-OEM as a high speed pulse counter for general counting applications.
Each counter can be set to any resolution up to 64-bits based on the software-selectable max limit and min limit
register values. The counters can accept frequency inputs up to 48 MHz.
In totalize mode, CxIN is used as the primary counter input. CxGT can be used to set the count direction, to gate
the counter, to clear/reload the counter with the min limit value, or to trigger a particular counter to begin
counting.
All totalize measurement mode options are software-selectable. Each option is explained in the table below.
Totalize counter mode options
Counter option

Description

Clear on read

The counter is cleared after each read (synchronous or asynchronous). The value of the counter
before it was cleared is latched and returned. It is typically cleared to zero, but depending on
counting mode, it may be cleared to the value stored in the min limit register.
When the range limit option is enabled, you can set the max limit and the min limit register values tomimic limit switches in a mechanical counter.
 When counting up, the counter freezes or rolls over to the min limit count whenever the countreaches the max limit register value.
 When counting down, the counter freezes or rolls over to the max limit count whenever the countreaches the min limit register value
The counter freezes if the max limit or the min limit is reached.
 When counting up, the counter stops when the max limit is reached.
 When counting down, the counter stops when the min limit is reached.
Counting resumes if the direction is reversed or if the counter is reloaded with a value between the
max limit and the min limit.
Enables count down mode. (This is overridden by the state of the gate input if the gate isprogrammed for direction control.)Enables counter output mode. Based on the output initial state of the counter (high or low), thecounter output toggles the state of the counter when it reaches the value of output register 0, andtoggles back to output initial state of the counter when the it reaches the value of output register 1.
Sets the initial state of the counter output to either high or low (default).

Range Limit

Non-recycle

CountDown
Output On

Output Initial
State

9

USB-CTR04-OEM User's Guide

Functional Details

Totalize options that are specific to the counter gate signal (CxGT ) are explained below.
Counter gate 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, thecounter increments when CxGT =1 (high), and decrements when CxGT=0 (low).
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 countvalue.

GatingClear/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 risingedge.

Period measurement mode
You can use the USB-CTR04-OEM 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 inticks.
Data sample errors come from two sources:

the sampling error caused by not being able to count a partial tickthe USB-CTR04-OEM internal timebase inaccuracy.

The measurement period is the time from edge-to-edge, either both rising or both falling. Period data is latchedas 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 bemeasured.
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.
The tick size is a fundamental unit of time derived from the period of the 96 MHz system clock. Fourcounter channel tick sizes are available – 20.83 ns, 208.3 ns, 2083.3 ns, and 20833.3 ns.

Tick size (period
resolution)

The USB-CTR04-OEM internal timebase has an absolute accuracy of 30 ppm. The sampling error varies basedon the input frequency, selected tick size, and selected period mode. The absolute error is the root-sum-ofsquares of the two independent error sources.
10USB-CTR04-OEM User's Guide

Functional Details

Pulse width measurement mode
You can use the USB-CTR04-OEM to measure the time from the rising edge to the falling edge, or vice versa,
on a counter input signal (CxIN). The measurement is either pulse width low or pulse width high, depending
upon the edge detection setting.


If the counter read period is faster than the input period, pulse widths repeat in the acquisition. The bigger
the difference between the counter read period and the input period, the more pulse widths are repeated.
If the counter read period is slower than the input period, then the acquisition misses some pulse widths.
The bigger the difference between the counter read period and the input period, the more pulse width
values are missed.

Decrease the counter read period in order to increase the number of different pulse widths received.
Every time the pulse width measurement is latched from the counter, the counter is immediately cleared andenabled to count the time for the next pulse width. The pulse width measurements are latched as they become
available.
The data returned is interpreted as time measured in ticks. This data represents the number of tick size intervals
counted during the pulse width 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. Pulse widths from sub-microsecond to many seconds
can be measured.
Pulse width measurement mode tick size options are software-selectable. The tick size is a fundamental unit oftime derived from the period of the 96 MHz system clock.
Four counter channel tick sizes (pulse width resolutions) are available – 20.83 ns, 208.3 ns, 2083.3 ns, and20833.3 ns.
Timing mode
You can use the USB-CTR04-OEM to measure the time between an event on CxIN and a subsequent event on
CxGT, such as the rising or falling edge of one event with respect to the rising or falling edge of another event(based on the edge detection setting).
Whenever the time measurement is latched from the counter, the counter is immediately cleared and enabled for
accepting the subsequent time period, which starts with the next edge on the main channel.
The following example measures the time between the rising edge on a counter input ( CxIN) and the fallingedge on the counter gate (CxGT). The counter read operation returns zeroes until one complete timemeasurement has been taken. Then, the value (time in ticks) is latched by the device until the next timemeasurement is completed. At that time, rising edges on the counter input channel clear the counter and fallingedges on the gate input latch the output of the counter.

Figure 3. Counter input channel in timing mode11

USB-CTR04-OEM User's Guide

Functional Details

If the counter read period is faster than the than the occurrence of the next time-frame rate (available on thetwo channels), then some time frames repeat in the acquisition. The bigger the difference between the
counter read period and the time frame occurrence, the more time frames are repeated.
If the counter read period is slower than the time-frame occurrence, then the acquisition misses some timeframes. The bigger the difference between the counter read period and the time frame occurrence, the moretime frames are missed.

Decrease the counter read period in order to capture more time frames.
The data returned is interpreted as time measured in ticks. This data represents the number of tick size intervals
counted during the timing measurement.
Timing mode tick size options are software-selectable. The tick size is a fundamental unit of time derived fromthe 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.

Debounce filters
The USB-CTR04-OEM has debounce circuitry which eliminates switch-induced transients that are typicallyassociated with electro-mechanical devices including relays, proximity switches, and encoders.
All debounce filter options are software-selectable. You can select a debounce time, debounce mode, and risingedge or falling-edge sensitivity. Each channel can be debounced with 16 programmable debounce times in therange of 500 ns to 25.5 ms.
Two debounce filter modes (trigger after stable and trigger before stable) and a debounce bypass are shown in
Figure 4. 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.

Figure 4. Debounce block diagram

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 filter 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.
Trigger after stable mode
In the trigger after stable mode, the output of the debounce module does not change state until a period ofstability has been achieved. This means that the input has an edge, and then must be stable for a period of timeequal to the debounce time. Refer to Figure 5.

Figure 5. Trigger after stable mode12

USB-CTR04-OEM User's Guide

Functional Details

T1 through T5 indicate time periods. In trigger after stable mode, the input signal to the debounce module isrequired to have a period of stability after an incoming edge, in order for that edge to be accepted (passed
through to the counter module). For this example, the debounce time is equal to T2 and T5.







T1 – In Figure 5, the input signal goes high at the beginning of time period T1, but never stays high for aperiod of time equal to the debounce time setting (equal to T2 for this example.)
T2 – At the end of time period T2, the input signal has transitioned high and stayed there for the required
amount of time—therefore the output transitions high. If the input signal does not stabilize in the high statelong enough, no transition would have appeared on the output and the entire disturbance on the input would
have been rejected.
T3 – During time period T3, the input signal remained steady. No change in output is seen.
T4 – During time period T4, the input signal has more disturbances and does not stabilize in any state longenough. No change in the output is seen.
T5 – At the end of time period T5, the input signal has transitioned low and stayed there for the required
amount of time—therefore the output goes low.

Trigger before stable mode
In the trigger before stable mode, the output of the debounce module immediately changes state, but will notchange state again until a period of stability has passed. For this reason the mode can be used to detect glitches.
Refer to Figure 6.

Figure 6. Trigger before stable mode

T1 through T5 in Figure 6 indicate time periods:







T1 – The input signal is low for the debounce time (equal to T1); therefore when the input edge arrives atthe end of time period T1, it is accepted and the output (of the debounce module) goes high. Note that aperiod of stability must precede the edge in order for the edge to be accepted.
T2 – During time period T2, the input signal is not stable for a length of time equal to T1 (the debounce
time setting for this example.) Therefore, the output stays "high" and does not change state during time
period T2.
T3 – During time period T3, the input signal is stable for a time period equal to T1, meeting the debounce
requirement. The output is held at the high state. This is the same state as the input.
T4 – At anytime during time period T4, the input can change state. When this happens, the output will alsochange state. At the end of time period T4, the input changes state, going low, and the output follows thisaction by going low.
T5 – During time period T5, the input signal again has disturbances that cause the input to not meet thedebounce time requirement. The output does not change state.
T6 – After time period T6, the input signal has been stable for the debounce time, and therefore any edge
on the input after time period T6 is immediately reflected in the output of the debounce module.

Debounce filter mode comparisons
Figure 7 shows how the two modes interpret an input signal, which exhibits glitches. Notice that the trigger
before stable mode recognizes more glitches than the trigger after stable mode. Enable the bypass option insoftware to achieve maximum glitch recognition.

13

USB-CTR04-OEM User's Guide

Functional Details

Figure 7. Example of two debounce modes interpreting the same signal

Set the debounce time according to the amount of instability expected in the input signal. Setting a debounce
time that is too short may result in unwanted glitches clocking the counter. Setting a debounce time that is toolong may result in an input signal being rejected entirely. Some experimentation may be required to find theappropriate debounce time for a particular application.
To see the effects of different debounce time settings, view the analog waveform along with the counter output.
This can be done by connecting the source to an analog input.
Use trigger before stable mode when the input signal has groups of glitches and each group is to be counted asone. The trigger before stable mode recognizes and counts the first glitch within a group but rejects thesubsequent glitches within the group if the debounce time is set accordingly. Set the debounce time toencompass one entire group of glitches, as shown in Figure 8.

Figure 8. Optimal debounce time for trigger before stable mode

Trigger after stable mode behaves more like a traditional debounce function: rejecting glitches and only passing
state transitions after a required period of stability. Trigger after stable mode is used with electro-mechanicaldevices like encoders and mechanical switches to reject switch bounce and disturbances due to a vibrating
encoder that is not otherwise moving.
The debounce time should be set short enough to accept the desired input pulse but longer than the period of theundesired disturbance, as shown in Figure 9.

14

USB-CTR04-OEM User's Guide

Functional Details

Figure 9. Optimal debounce time for trigger after stable mode

Digital I/O
You can connect up to eight digital I/O lines to DIO0 through DIO7. The digital I/O connectors can detect thestate of any TTL-level input. Refer to the schematic shown in Figure 10.

Figure 10. Schematic showing switch detection by digital channel DIO0

If you set the switch to the +5 V input, DIO0 reads TRUE (1). If you move the switch to GND, DIO0 reads
FALSE (0).

Pull-up/down jumper
The digital port has 47 kΩ resistors that you can configure as pull-up or pull-down with the jumper labeled W3.
Unconnected inputs are pulled low by default to 0 V through 47 kΩ resistors. The pull-up/pull-down voltage iscommon to all 47 kΩ resistors.
Caution! The discharge of static electricity can damage some electronic components. Before changing thejumper, either ground yourself using a wrist strap or touch the computer chassis or other grounded
object to eliminate any stored static charge.
Configure the jumper for either pull-up or pull-down. Figure 11 shows the location of the pull-up/down jumperon the USB-CTR04-OEM.

15

USB-CTR04-OEM User's Guide

Functional Details

Pull-up/down jumper (W3)

Figure 11. Pull-up/down jumper location

The pull-up/down jumper is configured by default for pull-down (see Figure 12).

Pull-down (factory default)

Pull-up

Figure 12. Pull-up/down jumper configurations

To pull the digital inputs high (5 V), configure the jumper for pull-up.

Timer output
You can use TMR0 through TMR3 as 32-bit timer outputs. Each timer can generate a programmable width pulse
with a software-selectable frequency in the range of 0.022 Hz to 48 MHz. At higher frequencies, the timer
output frequency and duty cycle depend on the load impedance and the supply.
The timer output rate and pulse width can be updated asynchronously at any time, however, doing so results in apulse stream that is not seamless.
The following timer output options are software-selectable:






pulse frequency
duty cycle (pulse width divided by the pulse period)
number of pulses to generate
time delay before starting the timer output after it's enabledresting state of the output (idle high or idle low)

Both the period and time delay ranges are 20.83 ns to 44.739 seconds.
16

USB-CTR04-OEM User's Guide

Functional Details

Figure 13. USB-CTR04-OEM PWM timer channel

Trigger input
You can trigger synchronous acquisitions of counter data internally with software or externally using the TRIG
digital trigger pin.
The TRIG input allows TTL-level triggering with latencies guaranteed to be less than 20.83 ns. The acquisition
can be triggered on a rising or falling edge, or on a high or low level. The trigger input is TTL logic . Latency is
one sample period, maximum. The input signal range is –0.5 V to 5.5 V maximum. The logic level (1 or 0) andthe rising or falling edge for the discrete trigger input are software-selectable. You can set up a repetitive trigger
mode with software; the trigger is automatically rearmed after it is activated.
When using the external trigger, the counter begins counting when the scan starts, even though acquisition of
the count is held off by the trigger. To coordinate the start of acquisition with the start of the count, you could
use the trigger signal to also trigger the gate of the counter in use. Clearing the counter before starting the scan
will re-arm the gate trigger.

External clock pacing
You can pace synchronous acquisition of counter data by the onboard clock or by an external clock connectedto the CLKI external clock input pin.

Power
Use the +VO power output pin to supply power to external devices or circuitry.
Caution! The +VO pin is an output. Do not connect to an external power supply or you may damage theUSB-CTR04-OEM and possibly the computer.
The maximum total output current that can be drawn from all USB-CTR04-OEM connections (counter outputs,
timer outputs, digital outputs, pacer clock output, and +VO) is 240 mA. This maximum applies to most personal
computers and self-powered USB hubs. Bus-powered hubs and notebook computers may limit the maximum
available output current to 100 mA.
If the current requirement of the device exceeds the current available from the computer, connect to a selfpowered hub or power the computer with an external power adapter.

GroundThe digital ground (GND) connections provide a common ground for the digital, counter, and power
connections.
Caution! Make sure that the signals are connected such that there is no potential between PC ground andsignal ground.

17

USB-CTR04-OEM User's Guide

Functional Details

Mechanical Drawings

Figure 14. USB-CTR04-OEM dimensions

18

Chapter 4

Specifications
All specifications are subject to change without notice.
Typical for 25°C unless otherwise specified.
Specifications in italic text are guaranteed by design.

CounterTable 1. Counter specifications
Parameter

Specification

Counter typeCounters
Counter input modes
Mode options
Gate options
Resolution
Maximum input frequency
Debounce times

FPGA
4 (each with a corresponding Input, Gate, and Output)
Totalize, Pulse width, Period, Timing
Non-Recycle, Range Limit, Clear on Read, Up/Down
Clear|Reload, Direction Control, Gate, Count trigger; mode dependent
Up to 64-bits (software-selectable)
48 MHz16 steps from 500 ns to 25.5 ms; positive or negative edge sensitive; glitch detectmode or debounce mode; software-selectable.
96 MHz (24 MHz – 30 ppm with a 4x DLL (delay-locked loop))
Internal or external scan pacer up to 4 MHz
20.83 ns; 208.3 ns; 2.083 µs; or 20.83 µs
Schmitt trigger, 47 kΩ pull-down to ground with 33 Ω in series

Timebase and accuracyCounter read pacer
Period/pulse width resolution
Input type (C0IN to C3IN and
C0GT to C3GT)
Schmitt trigger hysteresis (C0IN to
C3IN and C0GT to C3GT)
Input high voltage threshold (C0IN
to C3IN and C0GT to C3GT)
Input high voltage limit (C0IN to
C3IN and C0GT to C3GT)
Input low voltage threshold (C0IN
to C3IN and C0GT to C3GT)
Input low voltage limit (C0IN to
C3IN and C0GT to C3GT)
Output high voltage
Output low voltage
Output current

0.76 V typ
0.4 V min
1.2 V max
1.74 V typ
1.3 V min2.2 V max
5.5 V absolute max
0.98 V typ
0.6 V min
1.5 V max
–0.5 V absolute min
0 V recommended min
4.4 V min (IOH = –50 µA)
3.76 V min (IOH = –24 mA)
0.1 V max (IOL = 50 µA)
0.44 V max (IOL = 24 mA)
24 mA max per pin, constrained to 240 mA across all output pins (counter outputs,
timer outputs, digital outputs, pacer clock output, and +VO)

19

USB-CTR04-OEM User's Guide

Specifications

TimersTable 2. Timer specifications
Parameter

Specification

Terminal names
Timer typeOutput value
Internal clock frequency
Effective frequency range
Register widths
High pulse width
Low pulse width
Output high voltage

TMR0, TMR1, TMR2, TMR3
PWM output with count, period, delay, and pulse width registers
Default state is idle low with pulses high, software-selectable output invert
96 MHz0.022 Hz to 48 MHz
32-bit10.42 ns min
10.42 ns min
4.4 V min (IOH = –50 µA)
3.76 V min (IOH = –24 mA)
0.1 V max (IOL = 50 µA)
0.44 V max (IOL = 24 mA)
24 mA max per pin, constrained to 240 mA across all output pins (counter outputs,
timer outputs, digital outputs, pacer clock output, and +VO)

Output low voltage
Output current

Digital input/output
Table 3. Digital input/output specifications
Parameter

Specification

Digital type
Number of I/O
Configuration
Pull-up configuration

TTL
8
Bit-configurable as input (power on default) or output
The port has a 47 kΩ resistor configurable as a pull-up or pull-down (default) withan internal jumper.
33 to 8000 port reads/writes or single bit reads/writes per second typical, systemdependent.
Onboard clock, external input scan clock (CLKI)
External single channel digital trigger (TRIG)
2.0 V min
5.0 V absolute max
0.8 V max
0 V recommended min
4.4 V min (IOH = –50 µA)
3.76 V min (IOH = –24 mA)
0.1 V max (IOL = 50 µA)
0.44 V max (IOL = 24 mA)
24 mA max per pin, constrained to 240 mA across all output pins (counter outputs,
timer outputs, digital outputs, pacer clock output, and +VO)

Digital I/O transfer rate(system-paced, asynchronous)
Digital input pacing
Digital input trigger source
Input high voltage
Input low voltage
Output high voltage
Output low voltage
Output current

20USB-CTR04-OEM User's Guide

Specifications

External trigger
Table 4. Digital trigger specifications
Parameter

Specification

Trigger source
Trigger mode

External digital; TRIG terminal
Software-selectable for edge or level sensitive, rising or falling edge, high or low
level.
Trigger is rearmed after each trigger event
100 ns max
100 ns min
Schmitt trigger, 47 kΩ pull-down to ground with 33 Ω in series
0.76 V typ
0.4 V min
1.2 V max
1.74 V typ
1.3 V min2.2 V max
5.5 V absolute max
0.98 V typ
0.6 V min
1.5 V max
–0.5 V absolute min
0 V recommended min

Retrigger mode
Trigger latency
Trigger pulse width
Input type
Schmitt trigger hysteresis

Input high voltage threshold

Input high voltage limit
Input low voltage threshold

Input low voltage limit

External clock input/output
Table 5. External clock input/output specifications
Parameter

Specification

Terminal names
Terminal type

CLKI, CLKO
CLKI: Input, active on rising edge
CLKO: Output, power on default is 0V, active on rising edge
4 MHz, max
10.417 ns min
Schmitt trigger, 47 kΩ pull-down to ground with 33 Ω in series
0.76 V typ
0.4 V min
1.2 V max
1.74 V typ
1.3 V min2.2 V max
5.5 V absolute max
0.98 V typ
0.6 V min
1.5 V max
–0.5 V absolute min
0 V recommended min
4 MHz, max
10.417 ns
4.4 V min (IOH = –50 µA)
3.78V min (IOH = –24 mA)
0.1 V max (IOL = 50 µA)
0.44 V max (IOL = 24 mA)

Input clock frequency
Input clock pulse width
Input type
Input Schmitt trigger hysteresis

Input high voltage threshold

Input high voltage limit
Input low voltage threshold

Input low voltage limit
Output clock frequency
Output clock pulse width
Output high voltage
Output low voltage

21

USB-CTR04-OEM User's Guide

Specifications

Parameter

Specification

Output current

24 mA max per pin, constrained to 240 mA across all output pins (counter outputs,
timer outputs, digital outputs, pacer clock output, and +VO)

MemoryTable 6. Memory specifications
Parameter

Specification

FIFO
Non-volatile EEPROM

8 KS
32 KB (10 KB firmware storage, 22 KB user data)

Power
Table 7. Power specifications
Parameter

Condition

Specification

Supply current, USB source

During enumeration
After USB enumeration
After USB enumeration
After USB enumeration< 100 mA
< 500 mA
5 V, ± 5%24 mA max per pin, constrained to 240 mA across all
output pins (counter outputs, timer outputs, digital
outputs, pacer clock output, and +VO)

+VO power available+VO output current

USB
Table 8. USB specifications
Parameter

Specification

USB device type
Device compatibility
USB cable type

USB 2.0 (high-speed)
USB 1.1, USB 2.0, USB 3.0
A-B cable, UL type AWM 2725 or equivalent. (min 24 AWG VBUS/GND,
min 28 AWG D+/D–)
3 m (9.84 ft) max

USB cable length

Environmental
Table 9. Environmental specifications
Parameter

Specification

Operating temperature range
Storage temperature range
Humidity

0 °C to 50 °C–40 °C to 70 °C
0% to 90% non-condensing

Mechanical
Table 10. Mechanical specifications
Parameter

Specification

Dimensions (L × W × H)User connection length

119.38 × 86.36 × 15.24 mm (4.7 × 3.4 × 0.60 in.)3 m (9.84 ft) max

22USB-CTR04-OEM User's Guide

Specifications

Header connector
Table 11. Header connector specifications
Parameter

Specification

Connector typeTwo 1 × 28 pin 0.1 in. pitch headers

Header pinout
Table 12. Header pinout
Pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

Signal name
C0IN
C0GT
GND
C0O
C1IN
C1GT
GND
C1O
C2IN
C2GT
GND
C2O
C3IN
C3GT
GND
C3O
N/C
DIO0
DIO1
DIO2
DIO3
GND
GND
DIO4
DIO5
DIO6
DIO7
GND

Pin description
Counter 0 input
Counter 0 gate
Digital ground
Counter 0 output
Counter 1 input
Counter 1 gate
Digital ground
Counter 1 output
Counter 2 input
Counter 2 gate
Digital ground
Counter 2 output
Counter 3 input
Counter 3 gate
Digital ground
Counter 3 output
No connection
DIO bit 0
DIO bit 1
DIO bit 2
DIO bit 3
Digital ground
Digital ground
DIO bit 4
DIO bit 5
DIO bit 6
DIO bit 7
Digital ground

Pin
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

23

Signal name
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
N/C
GND
N/C
N/C
TMR0
TMR1
GND
TMR2
TMR3
TRIG
GND
CLKI
GND
CLKO
+VO

Pin description
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
No connection
Digital groundNo connection
No connection
Timer 0 output
Timer 1 output
Digital ground
Timer 2 output
Timer 3 output
Trigger input
Digital ground
External clock input
Digital ground
Internal clock output
User voltage output

Measurement Computing Corporation
10 Commerce Way
Suite 1008
Norton, Massachusetts 02766(508) 946-5100
Fax: (508) 946-9500
E-mail: info@mccdaq.com
www.mccdaq.com