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

Page 98

Advertising
background image

88

Serial I/O Models

if the card were to stop moving in the middle of the transfer process. If a high

level is detected on the I/O timeout pin, the io_in( ) function aborts. This input
can be a one-shot timer counter output, an RC circuit, or a ~Data_valid signal

from the card reader.
A Series 3100 Neuron Chip or Smart Transceiver with a 10 MHz input clock rate
can process a bit rate of up to 8334 bps (at a bit density of 75 bits per inch, this is

a card speed of 111 inches per second). Most magnetic card stripes contain a 15-
bit sequence of zero data at the start of the card, allowing time for the application

to start the card reading function. At 8334 bps, this period is about 1.8 ms. If

the scheduler latency is greater than the 1.8 ms value, for example, due to
application processing in another when task, the io_in( ) function can miss the

front end of the data stream.

Syntax

IO_8 [input] magcard [timeout (

pin-nbr

)] [clockedge (+|-)] [invert]

io-object-name

;


IO_8

Specifies pin IO_8. Magcard input requires both pins IO_8 and IO_9. Pin
IO_8 is the negative-going clock, IO_9 is the serial data input.

timeout(

pin-nbr

)

Optionally specifies the timeout signal pin, in the range of IO_0 to IO_7. The
Neuron Chip or Smart Transceiver checks the logic level at this pin whenever

it is waiting for either rising or falling edges of the clock. If a high logic level

is sensed on the timeout pin, the transfer is terminated.

clockedge (+|-)

Specifies the polarity of the clock input signal. The default is clockedge (-).

invert

Specifies that the data input signal is inverted. The default is no inversion.

io-object-name

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

identifiers.

Usage

unsigned int

count

,

input-buffer

[

buffer-size

];

count

= io_in(

io-object-name

,

input-buffer

);

Example

// In this example I/O pin IO_7 is connected to a
// ~Data_valid signal which is asserted low as long
// as a valid clock input is being generated by the
// reader device.

IO_8 input magcard timeout(IO_7) ioCardData;

Advertising