beautypg.com

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

Page 130

background image

120

Serial I/O Models

• The zero data bit signal
• A one data bit signal

Data pulses appear exclusively of each other and are typically spaced

approximately 1 ms apart. Specifications for the duration of the pulse are

typically between 50 to 100 μs, but they can be as short as 50 ns for a Series 3100
device with a 40 MHz input clock, or 12.5 ns for a Series 5000 device with an 80
MHz system clock. Table 48 shows the pulse width and inter-bit period (the

period between bit pulses).

Table 48. Wiegand Pulse Width and Inter-Bit Period

Parameter

Minimum

Maximum

Typical

Pulse Width

200 ns

880 ms

100 μs

Inter-Bit Time

150 μs

None

900 μs

Wiegand data is asynchronous. The io_in( ) function must be executing before

the second bit arrives, otherwise the first bit data is lost because it then becomes
impossible to determine the order of a zero and one event sequence. Data is read

most-significant bit (MSB) first, that is, the first data bit read will be stored in

the most significant bit location of the first byte of the array when eight bits are
read into that byte. If the number of bits transferred is not a multiple of eight, as

defined by

count

, the last byte transferred into the array contains the remaining

bits right justified within the byte.

For Wiegand input, one of the IO_0 through IO_7 pins can optionally be

designated as a timeout pin. A logic one level on the timeout pin causes the

Wiegand input operation to terminate before the specified number of bits has
been transferred. The Neuron Chip or Smart Transceiver updates the watchdog

timer while waiting for the next zero or one data bit to arrive. This timeout input
can be a one-shot timer counter output, an RC circuit, or a ~Data_valid signal

from the reader device.
The return_value for the io_in( ) function for this model is an unsigned short, and
it indicates the number of bits stored into the array. Whenever the io_in( )

function for a Wiegand I/O object is called, it immediately returns if there is

currently no activity on the indicated I/O pins. Otherwise, the function continues
to process input data until either

count

bits are stored, or until the timeout event

occurs. When the timeout event occurs, the number of bits read and stored is

returned. The io_in( ) function is blocking, and can take more than one second to
process the card information, depending upon the speed at which the card travels

through the reader. Because this function ties up the application processor, it

handles updates to the watchdog timer.

Syntax

pin

[input] wiegand [timeout(

pin-nbr

)]

io-object-name

;


pin

An I/O pin. Wiegand input requires two adjacent pins. The DATA 0 pin is

the pin specified, and the DATA 1 pin is the following pin. The pin