I/O support
Periodic I/O sampling
Digi XBee® 3 802.15.4 RF Module User Guide
98
This example uses the
, if you use the legacy format (
AO
=
2
or data is
received from an S1 or S2C device) then see
for information on how this data is
structured.
Output
Field
Description
7E
Start
Delimiter
Indicates the beginning of an API frame
00 19
Length
Length of the packet
97
Frame type
Remote AT Command response frame
87
Frame ID
This ID corresponds to the Frame ID of the 0x17 request
0013A200
12345678
64-bit
source
The 64-bit address of the node that responded to the request
0000
16-bit
source
The 16-bit address of the node that responded to the request
49 53
AT
Command
Indicates the AT command that this response corresponds to
0x49 0x53 =
IS
00
Status
Indicates success or failure of the AT command
00
=
OK
if no I/O lines are enabled, this will return
01
(ERROR)
01
One sample set
0C 0C
Digital channel mask, indicates which digital lines are sampled
(0x0C0C = 0000 1100 0000 1100b = DIO2, 3, 10, 11)
03
Analog channel mask, indicates which analog lines are sampled
(0x03 = 0000 0011b = AD0, 1)
04 08
Digital sample data that corresponds with the digital channel mask
0x0408 = 0000 0100 0000 1000b = DIO3 and DIO10 are high, DIO2
and DIO11 are low
03 D0
Analog sample data for AD0
01 24
Analog sample data for AD1
50
Checksum
Can safely be discarded on received frames
Periodic I/O sampling
Periodic sampling allows a device to take an I/O sample and transmit it to a remote device at a
periodic rate.
Source
Use
to set the periodic sample rate for enabled I/O lines.