COUNTER |
The COUNTER device counts pulses applied to its CLOCK input. The device can be programmed to be UP counter or DOWN counter. The counter's counting is incremented or decremented on the raising edge of the CLOCK pulse when the enable pin E is asserted. At startup the counter is initialized to the value programmed on the BASE parameter. The counter proceeds with its counting until the THRESHOLD value is reached. When this is reached the threshold signal TH will become true. The next cycle will load the counter with the BASE value again.
The counter can be initialized by asserting a true signal into the R pin. When the R signal is asserted, the counter is loaded with the BASE value.
The maximum counting value for this device is 65535.
Property settings
Parameter |
Description |
BASE |
The base value for the counting |
|
|
THRESHOLD |
The threshold value for the counting |
|
|
UPDOWN |
This parameter changes the direction of the counting |
Net plugs
Plug |
Description |
E |
Counting enable pin |
|
|
CK |
CLOCK input |
|
|
R |
RESET input |
|
|
TH |
THRESHOLD output |
|
|
OUT |
The counter value output |