4. Functions
CNT32-4MT(LPCI)
59
Count match
Functions are provided to generate an interrupt, externally output a one-shot pulse, preset the counter
value, or clear the counter to zero when the count matches the value in compare register 0 or compare
register 1.
The board has two compare registers for each channel used to compare the count value. If two or more
registers are required, use software to update the register values. Having two compare registers available
allows upper and lower limits to be set.
Table 4.9. Count match
Item Factor
Function
Interrupt
One-shot pulse output
Preset
Count match Count value = Comparison register 0 or
Count value = Comparison register 1
Zero-clear
Given below are application examples using the count match feature.
<Example 1> Move count values 100 to 200 in both ways. When the count value falls below 90 or
exceeds 210, a one-shot pulse is output to an external device.
Initial setting
External output signal selection:Count match 0 or Count match 1
Channel 0 Comparison register 1 = 210
Channel 0 Comparison register 0= 90
Channel 0 Preset register = 100
Event at (1) (Agrees with comparison register 0)
- A one-shot pulse is output with count value = comparison register 0.
210
200
100
90
Counter start
(1)
(2)
Event at (2) (Agrees with comparison register 1)
- A one-shot pulse is output with count value = comparison register 1.
Figure 4.13. Example 1
Содержание CNT32-4MT
Страница 7: ...vi CNT32 4MT LPCI ...
Страница 35: ...2 Setup 28 CNT32 4MT LPCI 3 Click on End Click on End ...
Страница 73: ...4 Functions 66 CNT32 4MT LPCI ...