beautypg.com

Programming considerations, Syntax – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 177

background image

I/O Model Reference

167

Symbol

Description

Typical at 10 MHz

Note: The maximum value for t

jit

is 1 timer/counter clock period.

Programming Considerations

The oneshot I/O model can be retriggered. A call to the io_out( ) function for a

oneshot object starts a new pulse, even if one is currently in progress.

For oneshot output, the data type of the output value for the io_out( ) function is

an unsigned long. An output value of zero (0) forces the output to a low state.

Syntax

pin

[output] oneshot [invert] [clock (

const-expr

)]

io-object-name

[=

initial-output-level

];

pin

Specifies either pin IO_0 (using the multiplexed timer/counter) or IO_1 (using

the dedicated timer/counter).

invert

Causes the output to be inverted, producing a signal that is normally high

with low pulses. The default is normally low with high pulses.

clock (

const-expr

)

Specifies a clock in the range 0 to 7, where 0 represents the fastest clock and

7 represents the slowest clock. The default value is clock 0.

You can change resolution for the timer base clock frequency by calling the

io_set_clock( ) function with a clock value in the range 0..7 (using one of the

TCCLK_* macros defined in ). This function overrides the
resolution value specified for clock() within the I/O object declaration.
For an application running on a Series 5000 device, you can specify an
increased resolution for the timer base clock frequency by calling the

io_set_clock() function with a clock value in the range 0..15 (using one of the

TCCLK_* macros defined in ). This function overrides the
resolution value specified for clock() within the I/O object declaration.
See Appendix A,

Timer/Counter Periods and Resolution

, on page 187, for a

description of the timer resolution and maximum range for each specification
of the clock() value or each value of the TCCLK_* macros. See the

Neuron C

Reference Guide

for information about the io_set_clock() function.

io-object-name

A user-specified name for the I/O object, in the ANSI C format for variable

identifiers.