Programming considerations, Syntax, Usage – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual
Page 168
158
Timer/Counter Output Models
Symbol Description
Minimum
Typical
Maximum
t
ret
Return from function
—
13 μs —
Programming Considerations
For edgedivide output, the data type of the output value for io_out( ) is an
unsigned long. Following reset of the Neuron Chip or Smart Transceiver, the
divider is disabled until the first call to the io_out( ) function. The first call to the
io_out( ) function for the edgedivide output model sets the output pin high and
starts the divider. When the divider is running, the function call to io_out( ) only
sets the value used for the divider and does not affect the state of the output pin.
However, when the output value is 0, the output signal is forced to a low state
and the divider is halted.
Syntax
pin
[output] edgedivide sync (
pin-nbr
) [invert]
io-object-name
[=
initial-output-level
];
pin
An I/O pin. Edgedivide output can specify pins IO_0 or IO_1. If IO_0 is
specified, the multiplexed timer/counter is used and the sync pin can be IO_4
through IO_7. If IO_1 is specified, the dedicated timer/counter is used and
the sync pin must be IO_4.
sync (
pin
-
nbr
)
Specifies the sync pin, which is the counting input signal. By default, the
divider counts negative edges.
invert
This keyword causes positive edges at the sync pin input to be counted rather
than the default negative edges.
io-object-name
A user-specified name for the I/O object, in the ANSI C format for variable
identifiers.
initial-output-level
A constant expression, in ANSI C format for initializers, used to set the state
of the output pin of the I/O object at initialization. The initial state can be 0
or 1. The default is 0.
Usage
unsigned long
output-value
;
io_out(
io-object-name
,
output-value
);