146
Platforms
©2000-2008 Tibbo Technology Inc.
you to sense the state of the external signal applied to the I/O line:
...
io.num=
PL_IO_NUM_4
'just to select some line as an example
io.enabled= NO
'now the output driver is off
x=io.state
'read line state into x
...
When the device boots up all pins are configured as inputs. If you want to use any
particular I/O pin as an output you need to enable the output driver first:
...
io.num=
PL_IO_NUM_5
'select the line
io.enabled= YES
'enable output driver (you need to do this only
once)
io.state= LOW
'set the state
...
Make sure that your external circuitry does not attempt to drive the I/O
lines that have their output buffers enabled. Severe damage to the
device and/or your circuitry may occur if this happens!
You can remap RTS/W0out/cout and CTS/W0&1in/cin lines of the serial
port
Two lines of the
-- RTS/W0out/cout output, and CTS/W0&1in/
cin input -- can be reassigned (remapped) to other I/O pins of the device. This is
done through
and
properties.
By default, the mapping of these two lines is different for each serial port. See
for details.
Positions of TX/W1out/dout output and RX/W1in/din input are fixed and
cannot be changed.
You have to explicitly configure certain I/O lines of the serial port as
inputs or outputs
On the EM1000(W), it is necessary to configure some lines of the
as
inputs our outputs. Depending on the mode of the serial port (see
)
you need to set the following:
ser.mode
TX/
W1out/
dout
output
RX/W1in/
din input
RTS/
W0out/
cout
output
CTS/
W0&1in/
cin input
224
261
249
142
224
255