Jäger ADwin-Gold-USB Manual page 32

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

Advertisement

CO1 Counter Add-On
Programming example
28
8.3.2 Four Edge Evaluation
This mode determines clock and direction of two signals, which are phase-
shifted by 90 degrees to the inputs A and B. The count direction is determined
by the temporal sequence of the rising and falling edges of the two input sig-
nals.
evaluation
A
4k7
B
4k7
CLR
4k7
Fig. 22 – Block diagram of the CO1 add-on in the mode
Please note:
– The counter counts 4 edges in one cycle of the A/B signal.
– The maximum count frequency is 20 MHz. Together with the 4 edges
per cycle it will result in a maximum input frequency of 5 MHz.
– The time between an edge at A and an edge at B must not be shorter
than 50 ns. Impulse widths or pause durations shorter than 100 ns are
not incremented.
– Changing the phase-shift will have an effect on the maximum input fre-
quency. If it differs from 90 degrees, the maximum input frequency of
5 MHz decreases for instance to 45 degrees at 2.5 MHz.
INIT:
. . .
CNT_ENABLE(0)
CNT_CLEAR(1)
CNT_MODE(0)
CNT_SET(0)
CNT_INPUTMODE(0)
CNT_SE_DIFF(0)
CNT_ENABLE(1)
EVENT:
CNT_LATCH(1)
CNT_READLATCH(1)
. . .
32 bit Latch A
4-edge
CLK
DIR
DIR
32 bit Counter
CLR
EN
Control Registers
"four edge evaluation"
initialization ...
disable counters
clear counter(s)
external clock input (CLK)
activate mode "four edge evaluation"
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
ADwin-Gold USB / ENET, manual version 3.8, October 2005
ADwin
Data
Data

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adwin-gold-enet

Table of Contents