Operating Mode Impulse/Event Counting - Jäger ADwin-Gold-USB Manual

Hide thumbs Also See for ADwin-Gold-USB:
Table of Contents

Advertisement

ADwin

8.3 Operating Mode Impulse/Event Counting

External square-wave signals at the inputs A/CLK and B/DIR clock the counters
in this mode. With CNT_SET you either activate the mode for determining the
clock frequency and direction or the four edge evaluation.
The input CLR/LATCH (at high-signal) can be used to
– clear the counter (CLR)
– latch the counter values into latch register A (LATCH).
8.3.1 Clock and Direction
CLK
4k7
DIR
4k7
4k7
CLR
Fig. 21 – Block diagram of the CO1 add-on in the mode
Every positive edge of a square-wave signal at the CLK input (clock) is counted
(incremented or decremented) up to a maximum frequency of 20 MHz. The
direction is derived from a high signal (count up) or low signal (count down) at
the DIR input (direction); This signal can be static, for a fixed count direction,
or dynamic, for changing directions.
INIT:
. . .
CNT_ENABLE(0)
CNT_CLEAR(1)
CNT_MODE(0)
CNT_SET(1)
CNT_INPUTMODE(0)
CNT_SE_DIFF(0)
CNT_ENABLE(1)
EVENT:
CNT_LATCH(1)
CNT_READLATCH(1)
. . .
ADwin-Gold USB / ENET, manual version 3.8, October 2005
32 bit Latch A
CLK
DIR
32 bit Counter
CLR
EN
Control Registers
"clock and direction"
initialization ...
disable counters
clear counter(s)
external clock input (CLK)
activate mode "clock and direction"
input CLR/LATCH as CLR input
select single-ended inputs
enable counter(s)
event loop ...
current counter value to latch A
read out latch A
evaluate counter value in process
Data
Data
CO1 Counter Add-On
Clear
Latch
Programming example
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adwin-gold-enet

Table of Contents