|
|
|
Component
EventCntr8
Event counter 8-bit
Properties:
-
Component name - Name of the component.
-
Counter - Counter register of the timer.
-
Interrupt service/event - Component uses the interrupt service for the counter function. If enabled, the component functionality (overflow detection) depends on the interrupt service and will not operate if the CPU interrupts are disabled. For details please refer to chapter "interrupt service in the component's generated code". Event OnEnd is available only if interrupt service is enabled.
The following items are available only if the group is enabled (the value is "Enabled"):
-
Interrupt - Interrupt vector invoked from the timer (for information only).
-
Interrupt priority - Priority of the interrupt associated with the timer.
-
Event - Event settings.
-
Counter input pin - Counter external clock pin.
-
Input pin signal - Signal name of input pin.
-
Settings not supported for Freescale MCF derivatives.
-
Pull resistor - Setting of pull resistor.
There are 6 options:
- no pull resistor: Input without pull resistor is required
- pull up: Input with pull-up resistor is required
- pull down: Input with pull-down resistor is required
- pull up or no pull: Input with pull-up resistor is preferred, but no-pull is acceptable
- pull down or no pull: Input with pull-down resistor is preferred, but no-pull is acceptable
- autoselected pull: There are no special requirements for pull resistors
-
Edge - Type of signal edges that are counted.
There are 4 options:
- rising or falling edge: One of the following edge type will be selected: rising or falling
- rising edge: Rising edge required
- falling edge: Falling edge required
- both edges: Both edges (rising and falling) required
-
Mode - Selects counting mode:
- Simple counter - counter counts up to 256 cycles.
- Repetitive - counter counts to a given number of cycles and event OnEnd is invoked (if it is enabled).
In both modes after selected number of cycles the method GetNumEvents returns ERR_OVERFLOW.
The following items are available only if the group is enabled (the value is "Repetitive"):
-
Iterations before action - Number of cycles to invoke the OnEnd event. (Property is only available when the component is in Repetitive mode)
-
Initialization - Initial settings (after power-on or reset).
-
Enabled in init. code - The component is enabled after a power-on or reset (in initialization code).
-
Events enabled in init. - Events enabled in initialization. (Property is only available when the component is in Repetitive mode)
|