Parameterising 2/4xcounter module
2 × 32 bit counter with GATE, RES edge-triggered and auto reload (mode 33 and 34)
12
Parameter setting
12.4
12.4.17
l
12.4-48
EDSPM-TXXX-3.0-04/2004
12.4.17 2 × 32 bit counter with GATE, RES edge-triggered and auto reload (mode 33
and 34)
epm-t154
Fig. 12.4-65 Terminal assignment of the 2/4xcounter in the modes 33 and 34
In the modes 33 and 34, two 32-bit counters are available, which are controlled via
a gate signal (gate). A starting value and a comparison value can be assigned to
each counter.
These modes offer thefunction ”Auto Reload”. This means, that the Load Register
can be assigned with a value which is automatically loaded into the counter as
soon as it reaches the comparison value set.
The modules differ in having different counting directions:
Mode 33: Upcounter
Mode 34: Downcounter
A LOW/HIGH edge at input IN1 / IN04 (RES
) clears the counter.
If a HIGH level is applied to input IN3 / IN6 (GATE), the counter is incremented or
decremented by 1 with each LOW/HIGH edge.
The counter counts up to the value set in the compare register. With this last
LOW-HIGH edge the counter content is overwritten with the value set in the load
register. This is repeated until the input IN3 / IN6 (GATE) receives a LOW signal.
If an ”Auto Reload” occurs, the signal level at the output OUT0 / OUT1 changes.
(A LOW-HIGH-edge at the output IN1 / IN4 (RES
)does not reset the output
OUT0 / OUT1.)
Terminal assignment
RES signal
GATE/CLK signal
OUT signal