UM-0085-B09
DT80 Range User Manual
Page 339
RG
Channel Options
The following channel options are applicable to high speed counters:
•
the
channel factor
specifies a counter "wrap value", as for the low speed counters. The counter will reset to 0
(or "wrap around") when this value is reached.
•
R
(
reset
): Counter will be cleared to 0 after returning its current value, as for the low speed counters.
•
LT
(low threshold): This option is only applicable to counter inputs
1C
and
2C
(i.e. counter channels
1HSC
and
2HSC
). It selects low level input thresholds (“low” threshold 2mV and “high” threshold 7mV), as opposed to
regular (TTL-level) thresholds.
Connecting to Counter Inputs
Counter input channels
1C-2C
and
3C-4C
have different electrical characteristics. In particular:
•
Inputs
1C-2C
include selectable TTL or low-level input thresholds. Low thresholds (selected by using the
LT
channel option) allow direct connection to sensors whose output is only a few mV, e.g. inductive-pickup flow
sensors.
•
Inputs
3C-4C
(and
5C-7C
) use a standard TTL level Schmitt trigger input.
Relay Contact Inputs
Voltage-free relay or switch contact closures can be counted on high speed counter channels by wiring the relay contacts
between the input terminal and
DGND
in the same way as for a digital input.
All inputs include low-pass filtering to assist in "debouncing" mechanical switch or relay inputs. For voltage-free contact
inputs this limits the maximum count rate to approximately 500Hz.
Logic Inputs
Logic outputs from external equipment may also be directly connected to a counter input in the same way as for a digital
input. For actively driven inputs such as these, the maximum count rate is typically around 100kHz.
Note:
the maximum count rate depends on the input amplitude. The following table indicates the typical maximum count rates possible
for various input levels:
Input level (V p-p)
Max count rate
10
25 kHz
5
80 kHz
3
150 kHz
1
250 kHz
Low Level Inputs
Inductive pickup sensors such as flow meters often have an output pulse amplitude of only a few millivolts. These can,
however, be directly connected to inputs
1C
or
2C
. The
LT
channel option must be specified in order to set the DT80's
input threshold levels appropriately, e.g.
1HSC(LT)
.
Refer to the
High Speed Counter Inputs (P381)
for more details on the counter input characteristics.
Special Count Modes
Counter input
3C
(i.e. channel
3HSC
) supports some special count modes. These are controlled by the
P27
setting, as
follows:
Setting
Description
P27=0
Normal
(default setting) –
3HSC
returns the number of pulses seen on the
3C
input
P27=1
Gated 32kHz
–
3HSC
increments at 32768Hz while input
3C
is low. This can be used for measuring
pulse widths.
P27=2
Gated 3C
–
3HSC
returns the number of pulses seen on input
3C
while input
4C
is low. This can be
used for measuring a short burst of pulses.
P27=3
Fixed 1024Hz –
3HSC
continuously increments at 1024Hz. This can be used for general high
resolution timing.
Counting While Asleep
The high-speed counter inputs continue to function while the DT80 is asleep.
However, it is important to note that each hardware counter is 16 bits wide. (Count values are maintained and returned
as 32-bit values, but the physical hardware counters attached to inputs
1C-4C
are 16-bit.) If more than 65536 pulses
occur while the DT80 is sleeping then the hardware counter will overflow, and this will cause an inaccurate count value to
be returned when the DT80 wakes.
It is therefore necessary to ensure that the DT80 is programmed to wake often enough to ensure that the hardware
counters can be read before they overflow.