163
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
0- PL_SOCK_INTERFACE_NULL:
Null (empty) interface.
1- PL_SOCK_INTERFACE_NET (default):
Ethernet interface.
EM1206W platform
0- PL_SOCK_INTERFACE_NULL:
Null (empty) interface.
1- PL_SOCK_INTERFACE_NET (default):
Ethernet interface.
2- PL_SOCK_INTERFACE_WLN:
Wi-Fi interface.
8.1.4.4
Platform-dependent Programming Information
This section contains miscellaneous information pertaining to the EM1206(W).
Various objects described in the
direct you to this topic in all
cases when object capabilities or behavior depends on the platform and, hence,
cannot be described in the object reference itself. Each platform section in this
manual has its own "Platform-dependent Programming Information" topic. If you
are reading documentation top-to-bottom (we have never actually met anyone
who does) you can skip this section now.
You have to explicitly configure I/O lines as inputs or outputs
On the EM1206(W) you need to explicitly enable or disable the output driver of
each I/O line (controlled by the
property allows
you to do this. When the driver is enabled (ser.enabled= 1-YES) and you read the
state of the pin you will get back the state of your own output buffer. To turn the
line into an input switch the output buffer off (ser.enabled= 0- NO). This will allow
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!
212
365
370