USB5841 Data Acquisition
Chapter 5 Methods of Using Timer/Counter
5.1 The working mode
MODE 0 Interrupt on terminal count
Mode 0 is typically used for event counting. After the Control Word is written, OUT is initially low, and will remain
low until the Counter reaches zero. OUT then goes high and remains high until a new count or a new Mode 0 Control
Word is written into the Counter.
GATE=1 enables counting; GATE=0 disables counting. GATE has no effect on OUT.
After the Control Word and initial count are written to a Counter, the initial count will be loaded on the next CLK pulse.
This CLK pulse does not decrement the count, so for an initial count of N, OUT does not go high until N+1 CLK
pulses after the initial count is written.
If a new count is written to the Counter, it will be loaded on the next CLK pulse and counting will continue from the
new count. If a two-byte count is written, the following happens:
1) Writing the first byte disables counting. OUT is set low immediately (no clock pulse required)
2) Writing the second byte allows the new count to be loaded on the next CLK pulse
This allows the counting sequence to be synchronized by software. Again, OUT does not go high until N+1 CLK pulses
after the new count of N is written.
If an initial count is written while GATE=0, it will still be loaded on the next CLK pulse. When GATE goes high, OUT
will go high N CLK pulse later, no CLK pulse is needed to load the Counter as this has already been done.
BUY ONLINE at art-control.com/englishs or CALL +86-10-51289836(CN)
10