beautypg.com

Usage – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 57

background image

I/O Model Reference

47

This argument has a minimum value of 7.2 μs (

t_low

= 1) from the

start of t

LOW

. The incremental resolution of

t_low

is 3 μs, so the

control range is 4.2 + n * 3 (in μs) where n is 1 to 255, and a

t-low

value of 0 is equivalent to n=256.

t-rdi

The length of t

RDI

. This is the interval where the Neuron firmware

asserts either a low or a high on the 1-Wire bus, depending on the

output data bit polarity. For read operations, this data polarity is

always high. This argument has a minimum value of 7.8 μs (

t-rdi

= 1)

from the start of t

RDI

. The incremental resolution of

t-rdi

is 3 μs, so

the control range is 4.8 + n * 3 (in μs) where n is 1 to 255, and a

t-rdi

value of 0 is equivalent to n=256.

t-wrd

Start of t

WRD

(end of t

RDI

). This is the point where the Neuron

firmware samples the 1-Wire bus for the input data bit, and occurs

for both read and write operations. This argument has a minimum

value of 15 μs (

t-wrd

= 1) from the start of t

WRD

. The incremental

resolution of

t-wrd

is 3 μs, so the control range is 12 + n * 3 (in μs)

where n is 1 to 255, and a

t-wrd

value of 0 is equivalent to n=256.

At the end of

t-wrd

, the Neuron firmware releases the 1-Wire bus.

io-object-name

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

identifiers.

Usage

unsigned int

count

;

unsigned int

touch-buffer

[

buffer-size

];

io_out(

io-object-name

,

touch-buffer

,

count

);

io_in(

io-object-name

,

touch-buffer

,

count

);

The

touch-buffer

can be any type or structure, and the type of the

touch-buffer

parameter is const void*. The address of the buffer is passed to the io_out( )
and io_in( ) functions. There are several additional support functions for the
Touch I/O object: touch_reset( ), touch_byte( ), touch_bit( ), touch_first( ),

touch_next( ), crc8( ), and crc16( ).

For Neuron Chips and Smart Transceivers that include system firmware version

18 or later, there are other additional support functions for the Touch I/O model:

touch_reset_spu( ), touch_byte_spu( ), touch_read_spu( ), touch_write_spu( ), and
crc16_ccitt().

int touch_reset(

io-object-name

);

The touch_reset( ) function asserts the reset pulse. The function returns a 1
value if a presence pulse was detected, or a 0 value if no presence pulse was

detected, or a -1 value if the 1-Wire bus appears to be stuck low. The operation of

this function is controlled by several timing constants:

• The reset pulse period, 500 μs.
• After the reset pulse period, the Neuron firmware releases the 1-Wire bus

and waits for the 1-Wire bus to return to the high state. This period is