Operation
I/O support
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
57
Multiple samples per packet
The
IT
parameter specifies how many I/O samples can be transmitted in a single OTA packet. Any
single-byte value (0 - 0xFF) is accepted for input. However, the value is adjusted downward based on
how many I/O samples can fit into a maximum size packet; see
. A query of the
IT
parameter after changes are applied tells how many I/O samples actually occur.
Since
MM
must be 0 or 3 to send I/O samples, the maximum payload in the best of conditions (short
source address, short destination address, and no encryption) is 114 bytes. Seven of those bytes are
used by the command header and the I/O header, leaving 107 bytes for I/O samples. The minimum I/O
sample is 2 bytes. Therefore the maximum possible usable value for
IT
is 53 (or 0x35).
API support
I/O data is sent out the UART using an API frame. All other data can be sent and received using
Transparent Operation or API frames if API mode is enabled (
AP
> 0).
API Operations support two RX (Receive) frame identifiers for I/O data (set 16-bit address to 0xFFFE
and the device does 64-bit addressing):
n
0x82 for RX Packet: 64-bit Address I/O
n
0x83 for RX Packet: 16-bit Address I/O
The API command header is the same as shown in
and
16-bit I/O Sample Indicator - 0x83
RX data follows the format described in
.
Periodic I/O sampling
Periodic I/O sampling is done by periodically gathering samples on the source node and sending the
samples to the destination node to output on its serial port.
Source node
On the source node, the
IR
parameter specifies how many milliseconds between samples. The
IT
parameter specifies how many samples will be sent OTA in a single packet, and the
DH
/
DL
parameters designate the node that will receive the samples. In addition
MM
must be 0 or 3 for I/O
samples to be sent.
The maximum value of
IR
is 0xFFFF. If
IR
is 0, periodic I/O sampling is disabled. Otherwise,
IR
specifies
the number of milliseconds between samples.
If
IT
is 0, than an I/O sample is sent every
IR
milliseconds. If
IR
is greater than 0, then an I/O sample is
sent every
IR
*
IT
milliseconds. Any single-byte value (0 - 0xFF) is accepted for input. However, the value
is adjusted downward based on how many I/O samples can fit into a maximum size packet. A query of
the
IT
parameter after changes are applied tells how many I/O samples will actually occur. Since
MM
must be 0 or 3 to send I/O samples, the maximum payload in the best of conditions (short source
address, short destination address, and no encryption) is 114 bytes. Seven of those bytes are used by
the command header and the I/O header, leaving 107 bytes for I/O samples. The minimum I/O sample
is 2 bytes. Therefore the maximum possible usable value for
IT
is 53 (or 0x35).