Configuration of the Main Type in One-shot Mode
Follow this procedure to configure a Main type in One-shot mode:
Step |
Action |
---|---|
1 |
Double-click Expert > DM72F• > HSCMain. |
2 |
Select the HSC Main Configuration tab. |
3 |
Set the value of the General > Counting Mode parameter to One-Shot. |
4 |
Select the value of the Counting inputs > A input > Bounce filter parameter. |
5 |
Enter the value of the Range > Preset parameter. |
6 |
Optionally, select the value of the SYNC, EN and CAP auxiliary inputs from the from the drop-down menu, to enable the preset function, Enable function and Capture function with a physical input. |
7 |
Optionally, select the Number of thresholds. This enables the Compare function and reflex outputs can be configured. |
8 |
When Stop Event is set to Yes, the external event (BLOCK0_HSCSTOP or BLOCK1_HSCSTOP) must be used to trigger an external task. |
NOTE: The IO Summary window displays the DM72F• I/O mapping. You can see the I/O used by expert function.
The filtering value on the Main type input determines the counter maximum frequency as shown in the table below:
Input |
Filter Value |
Maximum Counter Frequency |
---|---|---|
A |
0.002 ms (default value) |
200 kHz |
0.004 ms |
100 kHz |
|
0.012 ms |
40 kHz |
|
0.04 ms |
10 kHz |
|
0.12 ms |
4 kHz |
|
0.4 ms |
1 kHz |
|
1.2 ms |
400 Hz |
|
4 ms |
100 Hz |