23 Chapter 3
3.5 Period Measurement
3.5.1 Using Advantech 32-bit DLL Driver
This approach is for a low frequency signal.
We recommend you to perform period measurement through our 32-bit
DLL driver because it is the simplest way for both programming and
wiring. Just connect the unknown single to
Gate and the duty cycle will
be measured by the software.
3.5.2 Using Direct I/O
This approach is for a low frequency signal.
Figure 3.4: Period Measurement
Implementing this measurement needs two counters, one for the up cycle
period and another for the down cycle period. These added together gives
the total period. The duty cycle can also be calculated by dividing the up
period with the total period. Connect the unknown signal to each
counter's gate.
Apply a standard clock pulse to each counter. Counter 0 counts the up
cycle, while
Counter 1 counts the down cycle. In PCM-3780, wiring is
simple. Just connect the unknown signal to
Counter 0, and use the regis-
ter to select the gate source.
Counter 0 selects "Gate N". Counter 1
selects
"Gate N-1".
Apply the standard clock to both counters with the clock source selection
register. It can change the clock for different measurement ranges.
Counter 0 set as "Mode O" will make gate polarity positive. Counter 1
set as
"Mode O" will make gate polarity negative.