Sci (uart) input/output, Usage, Example – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 108: 98 and

Advertising
background image

98

Serial I/O Models

kbaud (

const-expr

)

Specifies the bit rate for a Neurowire master. The expression

const-expr

can

evaluate to 1, 10, or 20. The default is 20. The firmware uses this value as a

multiplier based on the Series 3100 input clock or Series 5000 system clock.

For example, for a Series 3100 device at 10 MHz, kbaud(10) yields 10 kbps;
for a Series 5000 device at 10 MHz, kbaud(10) yields 20 kbps. The bit rate

scales proportionally with the input or system clock.

Not used for a Neurowire slave.

clockedge (+|-)

Specifies the polarity of the clock signal. The default is a rising edge clock,
clockedge (+). Specifying clockedge (-) causes the data to be clocked at the

falling edge of the clock signal.

io-object-name

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

identifiers.

Usage

unsigned int

count

,

io

-

buffer

[

buffer

-

size

];

io_out(

io

-

object

-

name

,

io

-

buffer

,

count

);

Example

IO_8 neurowire master select(IO_2) ioDisplay;
IO_2 output bit ioDisplaySelect = 1; // active low

// 8 bits=>display config reg
unsigned int config = 0x01;

// 24 bits=>display data reg
unsigned int data[3];

when (...) {
io_out(ioDisplaySelect, 0);
config = 0x01;
io_out(ioDisplay, &config, 8);
data[0] = 0x80;
data[1] = 0xAB;
data[2] = 0xCD;
io_out(ioDisplay, data, 24);
io_out(ioDisplaySelect, 1);
}

SCI (UART) Input/Output

You can use the hardware Serial Communications Interface (SCI) I/O model in
applications that you develop for Smart Transceivers or Neuron Chips with

integrated universal asynchronous receiver/transmitter (UART) hardware such

as the PL 3120 Smart Transceiver, PL 3150 Smart Transceiver, PL 3170 Smart
Transceiver, or a Series 5000 device. SCI is an asynchronous serial

Advertising