
Operation Theorem
•
29
4.4 General Purpose Timer/Counter Operation
USBDAQ-9100MS has 2 8254-compatible timer/counter on board. It can
offer 2 independent 16-bit programmable down counters and cascaded
counters with programmable Gate and CLK Input.
Unlike others 8254 devices, USBDAQ-9100MS provides programmable
clock and gate input source for timer/counter. You can read the detailed
description in the function reference. For example, if you want to generate
a square wave, you just need to select the clock input as Internal Clock
Source and choose the base clock as 8MHz. You can simply got an 8
MHz clock source.
For 8254 operation mode, you can refer various 8254 documents in the
book. Here is just a brief description.
There are six modes in the standard 8254 (mode 0 to mode 5).
Mode 0 : Interrupt on terminal count
In this mode, the output goes low after the mode set operation, and the
counter begins to count down while the gate input is high. When
terminal count is reached, the output goes high and remains high until the
selected counter is set to a different mode.
The following diagram shows the timing diagram.
Clock
WR
Gate
Output
6 5 4
3 2 1 0
(n = 6)
A
B
A + B = n
Mode 1 : Hardware Retriggerable One Shot
In this mode, output will be initially high and go low on the clock pulse
following a trigger to begin the one-shot pulse, and will remain low until
the Counter reaches zero. Output will then go high and remain high until
the clock pulse after the next trigger. This Mode functions like a
divide-by-N counter. It is typically used to generate a Real Time Clock
Interrupt.
Summary of Contents for USBDAQ-9100MS
Page 2: ......
Page 6: ...ii Table of Contents Warranty Policy 32...