Oneshot output, Hardware considerations, Usage – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual
Page 175: Example
I/O Model Reference
165
io-object-name
Specifies a 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 is limited
to 0 or 1. The default is 0.
Usage
unsigned
count
;
unsigned long
output-frequency
,
timing-table
[
count
];
io_out(
io-object-name
,
output-frequency
,
timing-table
,
count
);
(There is no return value for the function.)
Example
IO_0 output infrared_pattern ioIrOut;
unsigned long timing [5]={395,395,783,783,395};
unsigned long frequency = 62;
when (...) {
io_out(ioIrOut, frequency, timing, 5);
}
Oneshot Output
The oneshot I/O model produces output pulses of a specified period or duty cycle.
That is, for Series 3100 devices, it can produce a single output pulse whose
duration is a function of the output value and the selected clock value, calculated
as follows:
duration (ns) = output_value * 2000 * 2^(clock) / input_clock (MHz)
where clock ranges from 0..7
For Series 5000 devices, it can produce a single output pulse whose duration is a
function of the output value and the selected clock value, calculated as follows:
duration (ns) = output_value * 2000 * 2^(value) / 10 MHz
where value ranges from 0..15
You can use this I/O model to implement digital-to-analog (D/A) converters or to
control any device with a pulsewidth modulated input.
This model applies to Series 3100 Neuron Chips and Smart Transceivers, and to
Series 5000 Neuron Processors and Smart Transceivers.
Hardware Considerations
A timer/counter can be configured to generate a single pulse of programmable
duration. The asserted state can be either logic high or logic low. Retriggering