Manual
ibaMS4xUCO
22
Issue 1.5
7.4.4.4 Up/down counter
The Up/down c
ounter uses always the “quadrature mode”, where all 4 edges are
counted, see Figure 6:
The phase offset between A and B signal determines the counting direction. If the high-
level of the A signal is before the B signal (typically 90° phase offset), then the channel
counts up (UpCounter). If the high-level of the B signal is before the A signal, then the
channel counts down (DownCounter).
A
B
t
Counter
t
1
2
1
2
Figure 8:
Theory: UpDownCounter
„Divide by 4“
Due to the “quadrature mode”, the counter is incremented by 4 (all 4 edges are counted).
For this case, the “divide by 4” function can be activated in order to divide the counter
reading by 4.
7.4.4.5 Period / frequency calculation
The period and frequency calculation is based on an internal 50 MHz quartz. Its clock
cycles are counted when the first activated edge occurs until the next activated edge
follows. The counter will be reset and restarts counting.
The period time results from the counted 50 MHz clock cycles
k
multiplied by the quartz
cycle time of 20 ns.
ns
k
T
20
The reciprocal of the cycle time is the frequency
f
.
T
f
1
Note
When using the
„quadrature mode“, the measured frequency increases by a factor of
4, the period decreases by a factor of 4.