beautypg.com

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

Page 138

background image

128 Timer/Counter

Input

Models

For additional information regarding dualslope A/D conversion, see the

Analog to

Digital Conversion with the Neuron Chip

engineering bulletin (part no. 005-

0019-02).

Neuron C Resources

The following functions and events are provided for use with the dualslope input

model:

io_in_request( )

Starts the first step of the integration process. The

control_value

argument

controls the length of the first integration period.

io_update_occurs

Signals the end of the entire conversion process. The value at

input_value

now contains the new measurement data.

Syntax

pin

[input] dualslope [mux | ded] [invert] [clock (

const-expr

)]

io-object-name

;

pin

An I/O pin. Dualslope input can specify pins IO_4 through IO_7.

mux | ded

Specifies whether the I/O object is assigned to the multiplexed or dedicated

timer/counter. This field only applies, and must be used, when pin IO_4 is

the input pin. The mux keyword assigns the I/O object to the multiplexed
timer/counter. The ded keyword assigns the I/O object to the dedicated

timer/counter.
When the dedicated timer/counter is used, the control output pin will be
IO_1. When the multiplexed timer/counter is used, the control output pin

will be IO_0. The multiplexed timer/counter is always used for pins IO_5
through IO_7.

invert

Reverses the logical value of the input pin. Use this keyword if the
comparator output is high when the converter is in the idle state.

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