Programming considerations – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual
Page 97
I/O Model Reference
87
Table 33. Magcard Input Latency Values for Series 3100 Devices
Symbol Description
Minimum
Typical
Maximum
t
fin
I/O call to first clock input
—
45.0 μs —
t
hold
Data
hold
0
μs — —
t
setup
Data
setup
0 μs — —
t
low
Clock low width
60 μs — —
t
high
Clock high width
60 μs — —
t
wto
Width of timeout pulse
60 μs — —
t
clk
Clock
period
120
μs — —
t
tret
Return from timeout
21.6 μs —
81.6
μs
t
ret
Return from function
—
—
301.8 μs
Programming Considerations
The magcard input model reads track 2 in the forward direction only (the
magcard_bitstream input model can read in either direction). The data is
presented as a data signal input on pin IO_9, and a clock, or data strobe, signal
input on pin IO_8. The data on pin IO_9 is clocked on or just following the falling
edge of the clock signal on IO_8, with the least significant bit first.
Data is recognized as a series of 4-bit characters plus an odd parity bit per
character. This process begins when the start sentinel (0x0B) is recognized, and
continues until the end sentinel (0x0F) is recognized. No more than 40
characters, including the two sentinels, will be read. The data is stored as
packed binary-coded decimal (BCD) digits in the buffer space pointed to by the
buffer pointer argument to the io_in( ) function with the parity bit stripped, and
includes the start and end sentinel characters. This buffer should be 20 bytes
long. The data is stored with the first character in the most significant nibble of
the first byte in the buffer.
For magcard input, the io_in( ) function requires a pointer to a data buffer, into
which the series of BCD pairs are stored. The io_in( ) function returns a signed
int that contains the actual number of characters stored.
The parity of each character is checked. The longitudinal redundancy check
(LRC) character, which appears just after the end sentinel, is also checked. If
either of these tests fail, if more than 40 characters are being clocked in, or if the
process aborts due to an input pin event, the io_in( ) function returns the value (-
1). The LRC character is not stored.
The magcard object optionally uses one of I/O pins IO_0 through IO_7 as a
timeout/abort pin. Use of this feature is suggested because the io_in( ) function
updates the watchdog timer during clock wait states, and could result in a lockup